mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01:00
Make SmackFuture.getOrThrow() throw InterruptedException
This commit is contained in:
parent
43abd52d76
commit
798d158d32
1 changed files with 2 additions and 7 deletions
|
@ -106,15 +106,10 @@ public abstract class SmackFuture<V, E extends Exception> implements Future<V>,
|
||||||
return getOrThrowExecutionException();
|
return getOrThrowExecutionException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized final V getOrThrow() throws E {
|
public synchronized final V getOrThrow() throws E, InterruptedException {
|
||||||
while (result == null && exception == null && !cancelled) {
|
while (result == null && exception == null && !cancelled) {
|
||||||
try {
|
|
||||||
wait();
|
wait();
|
||||||
}
|
}
|
||||||
catch (InterruptedException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (exception != null) {
|
if (exception != null) {
|
||||||
throw exception;
|
throw exception;
|
||||||
|
|
Loading…
Reference in a new issue