aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Pt502ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-09-10 16:55:25 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-09-10 16:55:25 +1200
commit223962059fd71881b3f210391cd4414afc3750e9 (patch)
tree27d62d4ad9d9e691ac7dd09eddaccff304fc6aa8 /src/org/traccar/protocol/Pt502ProtocolDecoder.java
parent7ddfed27e9135a074b292289bc7ed414485ddf8a (diff)
downloadtrackermap-server-223962059fd71881b3f210391cd4414afc3750e9.tar.gz
trackermap-server-223962059fd71881b3f210391cd4414afc3750e9.tar.bz2
trackermap-server-223962059fd71881b3f210391cd4414afc3750e9.zip
Fix Java code analytics issues
Diffstat (limited to 'src/org/traccar/protocol/Pt502ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Pt502ProtocolDecoder.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Pt502ProtocolDecoder.java b/src/org/traccar/protocol/Pt502ProtocolDecoder.java
index 7dc4fbe5e..24dc2094f 100644
--- a/src/org/traccar/protocol/Pt502ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Pt502ProtocolDecoder.java
@@ -91,10 +91,8 @@ public class Pt502ProtocolDecoder extends BaseProtocolDecoder {
String type = parser.next();
- if (type.startsWith("PHO")) {
- if (channel != null) {
- channel.write("#PHD0," + type.substring(3) + "\r\n");
- }
+ if (type.startsWith("PHO") && channel != null) {
+ channel.write("#PHD0," + type.substring(3) + "\r\n");
}
position.set(Position.KEY_ALARM, decodeAlarm(type));