diff options
author | Anton Tananaev <anton@traccar.org> | 2024-07-06 17:46:17 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-07-06 17:46:17 -0700 |
commit | b8390005722dd1cdb24d762797ef3f98ebc37755 (patch) | |
tree | caabf1a7541aebc4e81565e95ee78e2d8afe3d75 /src/main/java/org/traccar/protocol/T55ProtocolDecoder.java | |
parent | 75e3c6a6bbb028b2f99b06faac66d5b53cf59900 (diff) | |
download | trackermap-server-b8390005722dd1cdb24d762797ef3f98ebc37755.tar.gz trackermap-server-b8390005722dd1cdb24d762797ef3f98ebc37755.tar.bz2 trackermap-server-b8390005722dd1cdb24d762797ef3f98ebc37755.zip |
Update instanceof expressions
Diffstat (limited to 'src/main/java/org/traccar/protocol/T55ProtocolDecoder.java')
-rw-r--r-- | src/main/java/org/traccar/protocol/T55ProtocolDecoder.java | 5 |
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()); } } |