aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/EnforaProtocolEncoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-04-14 12:08:32 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-04-14 12:08:32 +1200
commit5c6a4302bb8ea3280d2f6633bd1017f9c6d21abd (patch)
treeed55d93b734b4becbad9a837b80c6728b3156753 /src/org/traccar/protocol/EnforaProtocolEncoder.java
parent051aeacefdf71959fcef25b33e1c139c845fddf5 (diff)
downloadtrackermap-server-5c6a4302bb8ea3280d2f6633bd1017f9c6d21abd.tar.gz
trackermap-server-5c6a4302bb8ea3280d2f6633bd1017f9c6d21abd.tar.bz2
trackermap-server-5c6a4302bb8ea3280d2f6633bd1017f9c6d21abd.zip
Fix FindBugs issues
Diffstat (limited to 'src/org/traccar/protocol/EnforaProtocolEncoder.java')
-rw-r--r--src/org/traccar/protocol/EnforaProtocolEncoder.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/EnforaProtocolEncoder.java b/src/org/traccar/protocol/EnforaProtocolEncoder.java
index e7da87388..3dca1b9b3 100644
--- a/src/org/traccar/protocol/EnforaProtocolEncoder.java
+++ b/src/org/traccar/protocol/EnforaProtocolEncoder.java
@@ -30,13 +30,11 @@ public class EnforaProtocolEncoder extends StringProtocolEncoder {
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
- byte[] contentBytes = content.getBytes();
-
- buf.writeShort(contentBytes.length + 6);
+ buf.writeShort(content.length() + 6);
buf.writeShort(0); // index
buf.writeByte(0x04); // command type
buf.writeByte(0); // optional header
- buf.writeBytes(content.getBytes(StandardCharsets.UTF_8));
+ buf.writeBytes(content.getBytes(StandardCharsets.US_ASCII));
return buf;
}