1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 05:52:06 +01:00

Make SmackFuture.getOrThrow() throw InterruptedException

This commit is contained in:
Florian Schmaus 2017-08-16 13:45:51 +02:00
parent 43abd52d76
commit 798d158d32

View file

@ -106,14 +106,9 @@ public abstract class SmackFuture<V, E extends Exception> implements Future<V>,
return getOrThrowExecutionException();
}
public synchronized final V getOrThrow() throws E {
public synchronized final V getOrThrow() throws E, InterruptedException {
while (result == null && exception == null && !cancelled) {
try {
wait();
}
catch (InterruptedException e) {
throw new RuntimeException(e);
}
wait();
}
if (exception != null) {