From 5346216b5f23d56477d1e5137370bb7b76325a88 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 9 Jun 2018 16:30:25 +1200 Subject: Fix some issues --- src/org/traccar/ExtendedObjectDecoder.java | 6 ++---- src/org/traccar/TrackerServer.java | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src') 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 { -- cgit v1.2.3