Merge pull request #506 from dzmitryh/master
Cosmetic fixes in async-method-invocation
This commit is contained in:
commit
932700d9b1
@ -57,12 +57,10 @@ public class ThreadAsyncExecutor implements AsyncExecutor {
|
||||
|
||||
@Override
|
||||
public <T> T endProcess(AsyncResult<T> asyncResult) throws ExecutionException, InterruptedException {
|
||||
if (asyncResult.isCompleted()) {
|
||||
return asyncResult.getValue();
|
||||
} else {
|
||||
if (!asyncResult.isCompleted()) {
|
||||
asyncResult.await();
|
||||
return asyncResult.getValue();
|
||||
}
|
||||
return asyncResult.getValue();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,6 @@ import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.Matchers.eq;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.mockito.internal.verification.VerificationModeFactory.times;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user