aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-10-17 16:52:38 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-10-17 16:52:38 +1300
commitae32084f88df4436e1a2cdcb346ff1e7e286e369 (patch)
tree5ec96dcedf19aa0c435c0e4d38f2ba60f583f9f6 /src
parent6f707c42d2798c93009e289a46d2faf918b75eea (diff)
downloadtraccar-server-ae32084f88df4436e1a2cdcb346ff1e7e286e369.tar.gz
traccar-server-ae32084f88df4436e1a2cdcb346ff1e7e286e369.tar.bz2
traccar-server-ae32084f88df4436e1a2cdcb346ff1e7e286e369.zip
Avoid protocol classes in tests
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java4
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) {