Author: jim.ma
Date: 2013-09-11 04:57:45 -0400 (Wed, 11 Sep 2013)
New Revision: 17910
Modified:
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
Log:
[JBWS-3652]:Refactor a bit
Modified:
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2013-09-11
08:34:16 UTC (rev 17909)
+++
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2013-09-11
08:57:45 UTC (rev 17910)
@@ -120,8 +120,9 @@
String resolvedAddress = null;
try
{
- isIPv6Address = !UNDEFINED_HOSTNAME.equals(host) &&
InetAddress.getByName(host) instanceof Inet6Address;
- resolvedAddress = InetAddress.getByName(host).getHostAddress();
+ InetAddress address = InetAddress.getByName(host);
+ isIPv6Address = !UNDEFINED_HOSTNAME.equals(host) && address instanceof
Inet6Address;
+ resolvedAddress = isIPv6Address ? address.getHostAddress() : null;
}
catch (UnknownHostException e)
{
Show replies by date