End process logic clause has been corrected.

This commit is contained in:
dzmitryh 2016-10-15 14:27:15 +03:00
parent 4ca205c03c
commit 85060784a7

View File

@ -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();
}
/**