From 58ade656e2070387f95984f5851cbc41990467ba Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 22 Jan 2018 19:33:56 +1300 Subject: Add new position constructor --- src/org/traccar/protocol/Mta6ProtocolDecoder.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/org/traccar/protocol/Mta6ProtocolDecoder.java') diff --git a/src/org/traccar/protocol/Mta6ProtocolDecoder.java b/src/org/traccar/protocol/Mta6ProtocolDecoder.java index 0fda94eef..c26e00c56 100644 --- a/src/org/traccar/protocol/Mta6ProtocolDecoder.java +++ b/src/org/traccar/protocol/Mta6ProtocolDecoder.java @@ -120,8 +120,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder { try { while (buf.readable()) { - Position position = new Position(); - position.setProtocol(getProtocolName()); + Position position = new Position(getProtocolName()); position.setDeviceId(deviceSession.getDeviceId()); short flags = buf.readUnsignedByte(); @@ -200,9 +199,8 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder { } private Position parseFormatA1(DeviceSession deviceSession, ChannelBuffer buf) { - Position position = new Position(); + Position position = new Position(getProtocolName()); position.setDeviceId(deviceSession.getDeviceId()); - position.setProtocol(getProtocolName()); short flags = buf.readUnsignedByte(); -- cgit v1.2.3