mirror of https://github.com/apache/jclouds.git
Issue 376: unchecked cast
This commit is contained in:
parent
b306573021
commit
f9a233274f
|
@ -65,7 +65,9 @@ public class ExceptionParsingListenableFuture<T> implements ListenableFuture<T>
|
|||
}
|
||||
|
||||
private T attemptConvert(Exception e) {
|
||||
return function.apply(e instanceof ExecutionException ? (Exception) e.getCause() : e);
|
||||
if (e instanceof ExecutionException && e.getCause() instanceof Exception)
|
||||
return function.apply((Exception) e.getCause());
|
||||
return function.apply(e);
|
||||
}
|
||||
|
||||
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
|
||||
|
|
Loading…
Reference in New Issue