aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Goos <kevingoos@telenet.be>2018-07-19 10:35:57 +0200
committerKevin Goos <kevingoos@telenet.be>2018-07-19 10:35:57 +0200
commitb8f17ea08288c62f22133156364f444b1e25c74b (patch)
tree0f3854d881a1d0f69910c79b15b223e394faf925
parentc6d6288d37a000cf364dce4753c24924f9fcc7de (diff)
downloadtraccar-server-b8f17ea08288c62f22133156364f444b1e25c74b.tar.gz
traccar-server-b8f17ea08288c62f22133156364f444b1e25c74b.tar.bz2
traccar-server-b8f17ea08288c62f22133156364f444b1e25c74b.zip
Fixed osmand code making it more elegant and fixing mistake
-rw-r--r--src/org/traccar/protocol/OsmAndProtocolDecoder.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
index 94055a282..b270b6071 100644
--- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java
+++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
@@ -70,13 +70,7 @@ public class OsmAndProtocolDecoder extends BaseHttpProtocolDecoder {
position.setDeviceId(deviceSession.getDeviceId());
break;
case "valid":
- if (value == "1") {
- position.setValid(true);
- } else if (value == "0") {
- position.setValid(false);
- } else {
- position.setValid(Boolean.parseBoolean(value));
- }
+ position.setValid(Boolean.parseBoolean(value) || "1".equals(value));
break;
case "timestamp":
try {