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

Inet4AddressImpl: Remove duplicate and (no longer used ?) native coding for BSD

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b150
    • OS:
      os_x

      Description

      In unix/native/libnet/Inet4AddressImpl.c there exist two paths of code for
      Java_java_net_Inet4AddressImpl_getLocalHostName
      Java_java_net_Inet4AddressImpl_lookupAllHostAddr and
      Java_java_net_Inet4AddressImpl_getHostByAddr

      There exists a code path that is used for _ALLBSD_SOURCE when the C-Runtime does not have gethostby... functions which seems a quite rare case. And it's even more obsolete as this code path is rather identical to the main path and implements lookup operations based on getaddrinfo/getnameinfo just as its counterparts.

        Issue Links

          Activity

          Hide
          clanger Christoph Langer added a comment -
          Call in Java_java_net_Inet4AddressImpl_lookupAllHostAddr to lookupIfLocalhost for MacOS is only done in obsolete version. It should probably be added to active version.
          Show
          clanger Christoph Langer added a comment - Call in Java_java_net_Inet4AddressImpl_lookupAllHostAddr to lookupIfLocalhost for MacOS is only done in obsolete version. It should probably be added to active version.
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/3edecfdfe4de
          User: clanger
          Date: 2016-12-19 08:34:53 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/3edecfdfe4de User: clanger Date: 2016-12-19 08:34:53 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/3edecfdfe4de
          User: lana
          Date: 2016-12-21 16:40:05 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/3edecfdfe4de User: lana Date: 2016-12-21 16:40:05 +0000

            People

            • Assignee:
              clanger Christoph Langer
              Reporter:
              clanger Christoph Langer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: