diff options
author | Abyss777 <abyss@fox5.ru> | 2017-09-05 08:58:52 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-09-05 08:58:52 +0500 |
commit | 158071c9ff74c5435b8f51ea82215240acb69551 (patch) | |
tree | 7f954059b508b4fd96d6976d3cd81ed2728a73f6 /src/org/traccar/protocol/WatchProtocolEncoder.java | |
parent | 87392d9fbb0289b5486496b6e6b97db1ea84e2b7 (diff) | |
download | trackermap-server-158071c9ff74c5435b8f51ea82215240acb69551.tar.gz trackermap-server-158071c9ff74c5435b8f51ea82215240acb69551.tar.bz2 trackermap-server-158071c9ff74c5435b8f51ea82215240acb69551.zip |
Use casting and remove super
Diffstat (limited to 'src/org/traccar/protocol/WatchProtocolEncoder.java')
-rw-r--r-- | src/org/traccar/protocol/WatchProtocolEncoder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/WatchProtocolEncoder.java b/src/org/traccar/protocol/WatchProtocolEncoder.java index e585a91c1..d2d3b52d1 100644 --- a/src/org/traccar/protocol/WatchProtocolEncoder.java +++ b/src/org/traccar/protocol/WatchProtocolEncoder.java @@ -33,7 +33,7 @@ public class WatchProtocolEncoder extends StringProtocolEncoder implements Strin @Override public String formatValue(String key, Object value) { if (key.equals(Command.KEY_TIMEZONE)) { - double offset = TimeZone.getTimeZone(value.toString()).getRawOffset() / 3600000.0; + double offset = TimeZone.getTimeZone((String) value).getRawOffset() / 3600000.0; DecimalFormat fmt = new DecimalFormat("+#.##;-#.##", DecimalFormatSymbols.getInstance(Locale.US)); return fmt.format(offset); } @@ -44,7 +44,7 @@ public class WatchProtocolEncoder extends StringProtocolEncoder implements Strin @Override protected String formatCommand(Command command, String format, String... keys) { - String content = super.formatCommand(command, format, this, keys); + String content = formatCommand(command, format, this, keys); return String.format("[CS*%s*%04x*%s]", getUniqueId(command.getDeviceId()), content.length(), content); } |