Polishing
This commit is contained in:
@@ -42,7 +42,7 @@ public class ListenableFutureCallbackRegistry<T> {
|
||||
|
||||
|
||||
/**
|
||||
* Adds the given callback to this registry.
|
||||
* Add the given callback to this registry.
|
||||
* @param callback the callback to add
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -64,7 +64,7 @@ public class ListenableFutureCallbackRegistry<T> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers a {@link ListenableFutureCallback#onSuccess(Object)} call on all
|
||||
* Trigger a {@link ListenableFutureCallback#onSuccess(Object)} call on all
|
||||
* added callbacks with the given result.
|
||||
* @param result the result to trigger the callbacks with
|
||||
*/
|
||||
@@ -79,7 +79,7 @@ public class ListenableFutureCallbackRegistry<T> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers a {@link ListenableFutureCallback#onFailure(Throwable)} call on all
|
||||
* Trigger a {@link ListenableFutureCallback#onFailure(Throwable)} call on all
|
||||
* added callbacks with the given {@code Throwable}.
|
||||
* @param ex the exception to trigger the callbacks with
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.springframework.util.concurrent;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -30,7 +29,7 @@ import static org.junit.Assert.*;
|
||||
public class ListenableFutureTaskTests {
|
||||
|
||||
@Test
|
||||
public void success() throws ExecutionException, InterruptedException {
|
||||
public void success() throws Exception {
|
||||
final String s = "Hello World";
|
||||
Callable<String> callable = new Callable<String>() {
|
||||
@Override
|
||||
@@ -53,7 +52,7 @@ public class ListenableFutureTaskTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void failure() throws ExecutionException, InterruptedException {
|
||||
public void failure() throws Exception {
|
||||
final String s = "Hello World";
|
||||
Callable<String> callable = new Callable<String>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user