1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

Improve handling of InterruptedException

InterruptedExceptions should be treated as the users intention to
'cancel' the current thread's task. There is no such thing as a
spurious interrupt (not to be confused with "spurious wakeups").
This commit is contained in:
Florian Schmaus 2015-01-16 15:55:06 +01:00
parent 14b03149db
commit d099e7b16d
5 changed files with 15 additions and 11 deletions

View file

@ -201,7 +201,6 @@ public class DummyConnection extends AbstractXMPPConnection {
return (P) queue.poll(wait, TimeUnit.SECONDS);
}
catch (InterruptedException e) {
// TODO handle spurious interrupts
throw new IllegalStateException(e);
}
}

View file

@ -49,7 +49,6 @@ public class WaitForPacketListener implements PacketListener {
}
}
catch (InterruptedException e) {
// TODO better handling of spurious interrupts
throw new IllegalStateException(e);
}
}