Browse Source

Polishing

pull/671/head
Juergen Hoeller 10 years ago
parent
commit
2956049c30
  1. 4
      spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncResult.java
  2. 12
      spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureAdapter.java

4
spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncResult.java

@ -84,8 +84,8 @@ public class AsyncResult<V> implements ListenableFuture<V> { @@ -84,8 +84,8 @@ public class AsyncResult<V> implements ListenableFuture<V> {
try {
successCallback.onSuccess(this.value);
}
catch (Throwable t) {
failureCallback.onFailure(t);
catch (Throwable ex) {
failureCallback.onFailure(ex);
}
}

12
spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureAdapter.java

@ -21,9 +21,9 @@ import java.util.concurrent.ExecutionException; @@ -21,9 +21,9 @@ import java.util.concurrent.ExecutionException;
/**
* Abstract class that adapts a {@link ListenableFuture} parameterized over S into a
* {@code ListenableFuture} parameterized over T. All methods are delegated to the
* adaptee, where {@link #get()}, {@link #get(long, java.util.concurrent.TimeUnit)}, and
* {@link ListenableFutureCallback#onSuccess(Object)} call {@link #adapt(Object)} on the
* adaptee's result.
* adaptee, where {@link #get()}, {@link #get(long, java.util.concurrent.TimeUnit)},
* and {@link ListenableFutureCallback#onSuccess(Object)} call {@link #adapt(Object)}
* on the adaptee's result.
*
* @param <T> the type of this {@code Future}
* @param <S> the type of the adaptee's {@code Future}
@ -34,7 +34,7 @@ public abstract class ListenableFutureAdapter<T, S> extends FutureAdapter<T, S> @@ -34,7 +34,7 @@ public abstract class ListenableFutureAdapter<T, S> extends FutureAdapter<T, S>
/**
* Construct a new {@code ListenableFutureAdapter} with the given adaptee.
* @param adaptee the future to adaptee to
* @param adaptee the future to adapt to
*/
protected ListenableFutureAdapter(ListenableFuture<S> adaptee) {
super(adaptee);
@ -59,8 +59,8 @@ public abstract class ListenableFutureAdapter<T, S> extends FutureAdapter<T, S> @@ -59,8 +59,8 @@ public abstract class ListenableFutureAdapter<T, S> extends FutureAdapter<T, S>
Throwable cause = ex.getCause();
onFailure(cause != null ? cause : ex);
}
catch (Throwable t) {
onFailure(t);
catch (Throwable ex) {
onFailure(ex);
}
}
@Override

Loading…
Cancel
Save