Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Koksharov committed Dec 4, 2023
1 parent c106c2f commit 8fdb900
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions redisson/src/main/java/org/redisson/misc/RedisURI.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ private String trimIpv6Brackets(String host) {
}

public boolean equals(InetSocketAddress entryAddr) {
if (((entryAddr.getHostName() != null && entryAddr.getHostName().equals(trimIpv6Brackets(getHost())))
|| entryAddr.getAddress().getHostAddress().equals(trimIpv6Brackets(getHost())))
String ip = trimIpv6Brackets(getHost());
if (((entryAddr.getHostName() != null && entryAddr.getHostName().equals(ip))
|| entryAddr.getAddress().getHostAddress().equals(ip))
&& entryAddr.getPort() == getPort()) {
return true;
}
Expand Down

0 comments on commit 8fdb900

Please sign in to comment.