aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/ExtendedObjectDecoder.java6
-rw-r--r--src/org/traccar/TrackerServer.java1
2 files changed, 2 insertions, 5 deletions
diff --git a/src/org/traccar/ExtendedObjectDecoder.java b/src/org/traccar/ExtendedObjectDecoder.java
index bb704c2e3..681924e87 100644
--- a/src/org/traccar/ExtendedObjectDecoder.java
+++ b/src/org/traccar/ExtendedObjectDecoder.java
@@ -20,7 +20,7 @@ import io.netty.buffer.ByteBufUtil;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
-import io.netty.util.ReferenceCounted;
+import io.netty.util.ReferenceCountUtil;
import org.traccar.helper.DataConverter;
import org.traccar.model.Position;
@@ -65,9 +65,7 @@ public abstract class ExtendedObjectDecoder extends ChannelInboundHandlerAdapter
}
}
} finally {
- if (originalMessage instanceof ReferenceCounted) {
- ((ReferenceCounted) originalMessage).release();
- }
+ ReferenceCountUtil.release(originalMessage);
}
}
diff --git a/src/org/traccar/TrackerServer.java b/src/org/traccar/TrackerServer.java
index 490106367..3a1e1c4e8 100644
--- a/src/org/traccar/TrackerServer.java
+++ b/src/org/traccar/TrackerServer.java
@@ -25,7 +25,6 @@ import io.netty.channel.socket.nio.NioDatagramChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.util.concurrent.GlobalEventExecutor;
-import java.io.IOException;
import java.net.InetSocketAddress;
public abstract class TrackerServer {