Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-2921

Wrong condition statement in NetworkUtils#formatAddress(InetSocketAddress)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 8.1.0.CR2
    • 8.0.0.Final
    • Management
    • None

    Description

      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());
      ...

      Attachments

        Activity

          People

            bstansbe@redhat.com Brian Stansberry
            tedwon Ted Won (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: