aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/T55ProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/T55ProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/T55ProtocolDecoder.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/T55ProtocolDecoder.java b/src/main/java/org/traccar/protocol/T55ProtocolDecoder.java
index 9e7518ce5..2538c914d 100644
--- a/src/main/java/org/traccar/protocol/T55ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/T55ProtocolDecoder.java
@@ -420,9 +420,8 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder {
sentence = sentence.substring(index);
} else {
deviceSession = getDeviceSession(channel, remoteAddress);
- if (deviceSession == null && remoteAddress instanceof InetSocketAddress) {
- String host = ((InetSocketAddress) remoteAddress).getHostString();
- deviceSession = getDeviceSession(channel, remoteAddress, host);
+ if (deviceSession == null && remoteAddress instanceof InetSocketAddress inetSocketAddress) {
+ deviceSession = getDeviceSession(channel, remoteAddress, inetSocketAddress.getHostString());
}
}