aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/handler/network/AcknowledgementHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/handler/network/AcknowledgementHandler.java')
-rw-r--r--src/main/java/org/traccar/handler/network/AcknowledgementHandler.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/handler/network/AcknowledgementHandler.java b/src/main/java/org/traccar/handler/network/AcknowledgementHandler.java
index e87f5d34c..7ba625e00 100644
--- a/src/main/java/org/traccar/handler/network/AcknowledgementHandler.java
+++ b/src/main/java/org/traccar/handler/network/AcknowledgementHandler.java
@@ -92,12 +92,10 @@ public class AcknowledgementHandler extends ChannelOutboundHandlerAdapter {
if (queue == null) {
queue = new LinkedList<>();
}
- } else if (msg instanceof EventDecoded) {
- EventDecoded event = (EventDecoded) msg;
+ } else if (msg instanceof EventDecoded event) {
LOGGER.debug("Event decoded {}", event.getObjects().size());
waiting.addAll(event.getObjects());
- } else if (msg instanceof EventHandled) {
- EventHandled event = (EventHandled) msg;
+ } else if (msg instanceof EventHandled event) {
LOGGER.debug("Event handled");
waiting.remove(event.getObject());
}