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

Fixes for InetAddressImpl native coding on Linux/Unix platforms

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 10
    • None
    • core-libs
    • None
    • 9
    • b01

    Description

      Several potential fixes have been identified for the linux/unix native coding of Inet4AddressImpl and Inet6AddressImpl. Besides some formatting cleanup in the source code, these are the most significant changes:

      Java_java_net_Inet4AddressImpl_lookupAllHostAddr:
      Java_java_net_Inet6AddressImpl_lookupAllHostAddr:
      - remove isspace(hostname[0]) check for Solaris. It should check if the hostname starts with a blank and throw an UnknownHostException in that case. However, testing on current Solaris shows that it is not needed and the UnknownHostException is thrown anyway.

      Java_java_net_Inet4AddressImpl_getHostByAddr:
      Java_java_net_Inet6AddressImpl_getHostByAddr:
      - replace CHECK_NULL_RETURN(ret, NULL) with throwing UnknownHostException in case of NULL return by NewStringUTF. This seems more correct if you look at the usage of getHostByAddr in InetAddress.java

      Java_java_net_Inet4AddressImpl_isReachable0:
      Java_java_net_Inet6AddressImpl_isReachable0:
      - moved tcp_ping code to static function, just as in the Windows implementation
      - cleanups to consistently use SOCKETADDRESS struct

      Attachments

        Activity

          People

            clanger Christoph Langer
            clanger Christoph Langer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: