Polishing

This commit is contained in:
Juergen Hoeller
2014-04-23 23:55:43 +02:00
parent c05ab3e2e8
commit 9353332a61
4 changed files with 10 additions and 8 deletions

View File

@@ -91,7 +91,8 @@ public class AsyncAnnotationAdvisor extends AbstractPointcutAdvisor implements B
}
if (exceptionHandler != null) {
this.exceptionHandler = exceptionHandler;
} else {
}
else {
this.exceptionHandler = new SimpleAsyncUncaughtExceptionHandler();
}
this.advice = buildAdvice(executor, this.exceptionHandler);

View File

@@ -62,6 +62,7 @@ public class AsyncAnnotationBeanPostProcessor extends AbstractAdvisingBeanPostPr
private Class<? extends Annotation> asyncAnnotationType;
private Executor executor;
private AsyncUncaughtExceptionHandler exceptionHandler;
@@ -93,6 +94,7 @@ public class AsyncAnnotationBeanPostProcessor extends AbstractAdvisingBeanPostPr
/**
* Set the {@link AsyncUncaughtExceptionHandler} to use to handle uncaught
* exceptions thrown by asynchronous method executions.
* @since 4.1
*/
public void setExceptionHandler(AsyncUncaughtExceptionHandler exceptionHandler) {
this.exceptionHandler = exceptionHandler;