Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8313947

InetAddressResolver.lookupByAddress should consider if it should make a mention of fully qualified domain name

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • core-libs
    • None

      java.net.InetAddress uses a system-wide resolver to determine the host name from a IP address. The resolver is an (user configurable) implementation of java.net.spi.InetAddressResolver.

      The API javadoc of InetAddress.getHostName() uses the term "host name" when/if resolving the host name from the address. On the other hand the API javadoc of InetAddress.getCanonicalHostName() uses the term "fully qualified domain name" when resolving the name from the address. The implementation of both these methods ultimately end up calling the same InetAddressResolver.lookupByAddress() API which in its javadoc uses the term "host name".

      It would be good to review the InetAddressResolver.lookupByAddress and set up any expectations on whether implementations of that interface are expected to return fully qualified domain name.

      This came up during the review of https://github.com/openjdk/jdk/pull/15134

            aefimov Aleksej Efimov
            jpai Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: