[jboss-jira] [JBoss JIRA] (WFLY-2921) Wrong condition statement in NetworkUtils#formatAddress(InetSocketAddress)
Sri Ram (JIRA)
issues at jboss.org
Sat May 3 15:47:56 EDT 2014
[ https://issues.jboss.org/browse/WFLY-2921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965283#comment-12965283 ]
Sri Ram commented on WFLY-2921:
-------------------------------
Sent a pull request which improves the test cases by adding test for unresolved address scenario.
> Wrong condition statement in NetworkUtils#formatAddress(InetSocketAddress)
> --------------------------------------------------------------------------
>
> Key: WFLY-2921
> URL: https://issues.jboss.org/browse/WFLY-2921
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 8.0.0.Final
> Reporter: Ted Won
> Priority: Minor
>
> It seems there is a wrong condition statement of formatAddress(InetSocketAddress inet) in the class org.jboss.as.network.NetworkUtils.
> https://github.com/wildfly/wildfly/blob/master/network/src/main/java/org/jboss/as/network/NetworkUtils.java
> This method returns "ipAddress:port", but expected to "hostname:port".
> public static String formatAddress(InetSocketAddress inet)
> ...
> // As-is
> if(inet.isUnresolved()){
> result.append(inet.getHostName());
> // Expected to reversely:
> if(!inet.isUnresolved()){
> result.append(inet.getHostName());
> ...
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
More information about the jboss-jira
mailing list