Skip to content

Commit

Permalink
[ISSUE #402] 修复异常拒绝任务时跳过afterReject执行问题
Browse files Browse the repository at this point in the history
  • Loading branch information
SimpleIto committed Feb 22, 2024
1 parent 12b672a commit 9638935
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 9638935

Please sign in to comment.