diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-10-17 16:52:38 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-10-17 16:52:38 +1300 |
commit | ae32084f88df4436e1a2cdcb346ff1e7e286e369 (patch) | |
tree | 5ec96dcedf19aa0c435c0e4d38f2ba60f583f9f6 /src/org | |
parent | 6f707c42d2798c93009e289a46d2faf918b75eea (diff) | |
download | trackermap-server-ae32084f88df4436e1a2cdcb346ff1e7e286e369.tar.gz trackermap-server-ae32084f88df4436e1a2cdcb346ff1e7e286e369.tar.bz2 trackermap-server-ae32084f88df4436e1a2cdcb346ff1e7e286e369.zip |
Avoid protocol classes in tests
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/BaseProtocolDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java index 2914fc3ac..8f495900a 100644 --- a/src/org/traccar/BaseProtocolDecoder.java +++ b/src/org/traccar/BaseProtocolDecoder.java @@ -39,6 +39,8 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder { private static final Logger LOGGER = LoggerFactory.getLogger(BaseProtocolDecoder.class); + private static final String PROTOCOL_UNKNOWN = "unknown"; + private final Config config = Context.getConfig(); private final IdentityManager identityManager = Context.getIdentityManager(); private final ConnectionManager connectionManager = Context.getConnectionManager(); @@ -50,7 +52,7 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder { } public String getProtocolName() { - return protocol != null ? protocol.getName() : null; + return protocol != null ? protocol.getName() : PROTOCOL_UNKNOWN; } public String getServer(Channel channel) { |