Skip to content

Commit

Permalink
Merge pull request #406 from SimpleIto/dev
Browse files Browse the repository at this point in the history
[ISSUE #402] 修复异常拒绝任务时跳过afterReject执行问题
  • Loading branch information
yanhom1314 authored Feb 25, 2024
2 parents 12b672a + 9638935 commit 7f976b7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ public RejectedInvocationHandler(Object target) {

@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
beforeReject((Runnable) args[0], (Executor) args[1]);
try {
beforeReject((Runnable) args[0], (Executor) args[1]);
Object result = method.invoke(target, args);
afterReject((Runnable) args[0], (Executor) args[1]);
return result;
return method.invoke(target, args);
} catch (InvocationTargetException ex) {
throw ex.getCause();
} finally {
afterReject((Runnable) args[0], (Executor) args[1]);
}
}

Expand Down

0 comments on commit 7f976b7

Please sign in to comment.