From 38e92f477d95c4361f9b40b14f764fea20e42011 Mon Sep 17 00:00:00 2001 From: Evgeny S Maksimov Date: Tue, 22 Jan 2019 20:05:40 +0300 Subject: Instance variables optimization --- src/org/traccar/protocol/NavisProtocolDecoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/NavisProtocolDecoder.java b/src/org/traccar/protocol/NavisProtocolDecoder.java index 61c39aaf4..9ea843daa 100644 --- a/src/org/traccar/protocol/NavisProtocolDecoder.java +++ b/src/org/traccar/protocol/NavisProtocolDecoder.java @@ -44,7 +44,6 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { private int flexDataSize; // Bytes private int flexBitfieldDataSize; // Bits private final byte[] flexBitfield; - private byte flexProtocolVersion, flexStructVersion; private static final Logger LOGGER = LoggerFactory.getLogger(NavisProtocolDecoder.class); private static final int[] FLEX_FIELDS_SIZES = {4, 2, 4, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 2, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 4, 4, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, @@ -579,6 +578,8 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { return null; } + byte flexProtocolVersion, flexStructVersion; + flexProtocolVersion = (byte) buf.readUnsignedByte(); flexStructVersion = (byte) buf.readUnsignedByte(); if (flexProtocolVersion != (byte) 0x0A && flexProtocolVersion != (byte) 0x14) { -- cgit v1.2.3