aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-09 16:30:25 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-09 16:30:25 +1200
commit5346216b5f23d56477d1e5137370bb7b76325a88 (patch)
treef5d953490d07cf7b55fe2e4f86a65b1f07ee13ab /src
parent0e1c89d007b761a83c11dcb2ba378c4db02200ee (diff)
downloadtrackermap-server-5346216b5f23d56477d1e5137370bb7b76325a88.tar.gz
trackermap-server-5346216b5f23d56477d1e5137370bb7b76325a88.tar.bz2
trackermap-server-5346216b5f23d56477d1e5137370bb7b76325a88.zip
Fix some issues
Diffstat (limited to 'src')
-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 {