Assert that processPacket is not called with null

This commit is contained in:
Florian Schmaus 2014-12-28 18:05:04 +01:00
parent d295939285
commit 5d5e3c05c5
2 changed files with 1 additions and 4 deletions

View File

@ -905,6 +905,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
* @param packet the packet to process.
*/
protected void processPacket(Packet packet) {
assert(packet != null);
lastStanzaReceived = System.currentTimeMillis();
// Deliver the incoming packet to listeners.
executorService.submit(new ListenerNotification(packet));

View File

@ -225,10 +225,6 @@ public class PacketCollector {
* @param packet the packet to process.
*/
protected void processPacket(Packet packet) {
if (packet == null) {
return;
}
if (packetFilter == null || packetFilter.accept(packet)) {
while (!resultQueue.offer(packet)) {
// Since we know the queue is full, this poll should never actually block.