Skip to content

Commit 7c2181f

Browse files
committed
fix: wrong order in comparator
1 parent 1cfb14f commit 7c2181f

File tree

1 file changed

+1
-1
lines changed
  • modules/kernel/src/org/apache/axis2/util

1 file changed

+1
-1
lines changed

modules/kernel/src/org/apache/axis2/util/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ public static String getIpAddress() throws SocketException {
681681
//prefer ipv4 for backwards compatibility, we used to only consider ipv4 addresses
682682
Function<InetAddress,Integer> preferIpv4 = (i) -> i instanceof Inet4Address ? 1 : 0;
683683
return getLocalHostLANAddresses().stream()
684-
.min(Comparator.comparing(preferIpv4))
684+
.max(Comparator.comparing(preferIpv4))
685685
.map(InetAddress::getHostAddress).orElse("127.0.0.1");
686686
}
687687

0 commit comments

Comments
 (0)