aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/BaseProtocolEncoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/BaseProtocolEncoder.java')
-rw-r--r--src/main/java/org/traccar/BaseProtocolEncoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/BaseProtocolEncoder.java b/src/main/java/org/traccar/BaseProtocolEncoder.java
index bc1180a08..9c3934184 100644
--- a/src/main/java/org/traccar/BaseProtocolEncoder.java
+++ b/src/main/java/org/traccar/BaseProtocolEncoder.java
@@ -61,7 +61,7 @@ public abstract class BaseProtocolEncoder extends ChannelOutboundHandlerAdapter
}
protected void initDevicePassword(Command command, String defaultPassword) {
- if (!command.getAttributes().containsKey(Command.KEY_DEVICE_PASSWORD)) {
+ if (!command.hasAttribute(Command.KEY_DEVICE_PASSWORD)) {
String password = AttributeUtil.getDevicePassword(
cacheManager, command.getDeviceId(), getProtocolName(), defaultPassword);
command.set(Command.KEY_DEVICE_PASSWORD, password);