diff options
author | jon-stumpf <jon.stumpf@gmail.com> | 2014-10-10 22:25:02 -0400 |
---|---|---|
committer | jon-stumpf <jon.stumpf@gmail.com> | 2014-10-21 16:01:41 -0400 |
commit | f0790eba6f3194daf4677c27e8259f783aae3207 (patch) | |
tree | 7e206023124d1e9f1705af1f11d0eaede08edab1 /src/org/traccar/protocol/GlobalSatProtocolDecoder.java | |
parent | 1948e0f63202dddca607dcb51fa9a92a83e49154 (diff) | |
download | trackermap-server-f0790eba6f3194daf4677c27e8259f783aae3207.tar.gz trackermap-server-f0790eba6f3194daf4677c27e8259f783aae3207.tar.bz2 trackermap-server-f0790eba6f3194daf4677c27e8259f783aae3207.zip |
Made BaseProtocolDecoder members "final" as they should not change after construction.
Diffstat (limited to 'src/org/traccar/protocol/GlobalSatProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/GlobalSatProtocolDecoder.java | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java index bd56fde1f..de49d0b85 100644 --- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java +++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java @@ -24,42 +24,23 @@ import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelHandlerContext; import org.traccar.BaseProtocolDecoder; import org.traccar.ServerManager; +import org.traccar.database.DataManager; import org.traccar.helper.Log; import org.traccar.model.ExtendedInfoFormatter; import org.traccar.model.Position; public class GlobalSatProtocolDecoder extends BaseProtocolDecoder { - private String format0; - private String format1; + private String format0 = "TSPRXAB27GHKLMnaicz*U!"; + private String format1 = "SARY*U!"; - public GlobalSatProtocolDecoder(ServerManager serverManager) { - super(serverManager); - - // This is now only called by test classes. - // This will be deleted in the next commit. - assert (serverManager == null); - - // Initialize format strings - format0 = "TSPRXAB27GHKLMnaicz*U!"; - format1 = "SARY*U!"; - if (getServerManager() != null) { - Properties p = getServerManager().getProperties(); - if (p.containsKey("globalsat.format0")) { - format0 = p.getProperty("globalsat.format0"); - } - if (p.containsKey("globalsat.format1")) { - format1 = p.getProperty("globalsat.format1"); - } - } + public GlobalSatProtocolDecoder(DataManager dataManager) { + super(dataManager); } public GlobalSatProtocolDecoder(ServerManager serverManager, String protocol) { super(serverManager, protocol); - // Initialize format strings - format0 = "TSPRXAB27GHKLMnaicz*U!"; - format1 = "SARY*U!"; if (getServerManager() != null) { Properties p = getServerManager().getProperties(); if (p.containsKey(protocol + ".format0")) { |