Skip to content

Commit 8d076a3

Browse files
committed
fix: use InetAddress::getHostAddress instead of InetAddress::toString
1 parent 156665e commit 8d076a3

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
@@ -667,7 +667,7 @@ public static List<InetAddress> getLocalHostLANAddresses() throws SocketExceptio
667667
* @return Returns String.
668668
*/
669669
public static String getIpAddress() throws SocketException {
670-
return getLocalHostLANAddresses().stream().findFirst().map(InetAddress::toString).orElse("127.0.0.1");
670+
return getLocalHostLANAddresses().stream().findFirst().map(InetAddress::getHostAddress).orElse("127.0.0.1");
671671
}
672672

673673
/**

0 commit comments

Comments
 (0)