aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-02-04 22:04:48 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-02-04 22:04:48 -0800
commit7e9c68727d65c858264a493003f73195e4f51210 (patch)
treecbf1fcc534ba2c8413c69d21e25207c1ccc667ad /src
parent211dffbcc7d6e43238e7560af968a018b410d60c (diff)
downloadtraccar-server-7e9c68727d65c858264a493003f73195e4f51210.tar.gz
traccar-server-7e9c68727d65c858264a493003f73195e4f51210.tar.bz2
traccar-server-7e9c68727d65c858264a493003f73195e4f51210.zip
Support old Java versions
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/ArnaviBinaryProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/ArnaviBinaryProtocolDecoder.java b/src/main/java/org/traccar/protocol/ArnaviBinaryProtocolDecoder.java
index d25c02414..e957a6911 100644
--- a/src/main/java/org/traccar/protocol/ArnaviBinaryProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/ArnaviBinaryProtocolDecoder.java
@@ -27,6 +27,7 @@ import org.traccar.helper.Checksum;
import org.traccar.model.Position;
import java.net.SocketAddress;
+import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.util.Date;
import java.util.LinkedList;
@@ -63,7 +64,7 @@ public class ArnaviBinaryProtocolDecoder extends BaseProtocolDecoder {
response.writeByte(0x04);
response.writeByte(0x00);
ByteBuffer time = ByteBuffer.allocate(4).putInt((int) (System.currentTimeMillis() / 1000));
- time.position(0);
+ ((Buffer) time).position(0);
response.writeByte(Checksum.modulo256(time.slice()));
response.writeBytes(time);
}