aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ExtendedObjectDecoder.java
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/org/traccar/ExtendedObjectDecoder.java
parent0e1c89d007b761a83c11dcb2ba378c4db02200ee (diff)
downloadtrackermap-server-5346216b5f23d56477d1e5137370bb7b76325a88.tar.gz
trackermap-server-5346216b5f23d56477d1e5137370bb7b76325a88.tar.bz2
trackermap-server-5346216b5f23d56477d1e5137370bb7b76325a88.zip
Fix some issues
Diffstat (limited to 'src/org/traccar/ExtendedObjectDecoder.java')
-rw-r--r--src/org/traccar/ExtendedObjectDecoder.java6
1 files changed, 2 insertions, 4 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);
}
}