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

Update comment for Java_java_net_Inet6AddressImpl_getHostByAddr

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P5
    • 15
    • 8u45, 9, 11, 14, 15
    • core-libs
    • b17
    • x86
    • solaris_nevada

    Description

      FULL PRODUCT VERSION :
      JDK-8u45

      ADDITIONAL OS VERSION INFORMATION :
      $ uname -a
      SunOS telling 5.11 11.2 i86pc i386 i86pc

      but the problem is generic.

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Not applicable.

      A DESCRIPTION OF THE PROBLEM :
      Looking at

          http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/file/fddcb008fd1d/src/solaris/native/java/net/Inet6AddressImpl.c

      the comment is

          /*
           * Class: java_net_Inet6AddressImpl
           * Method: getHostByAddr
           * Signature: (I)Ljava/lang/String;
           */
          JNIEXPORT jstring JNICALL
          Java_java_net_Inet6AddressImpl_getHostByAddr(JNIEnv *env, jobject this,
                                                      jbyteArray addrArray)

      and the "Signature" line is incorrect. The method takes a "byte[]" rather than a "int".

      The method being implemented is in java.net.Inet6AddressImpl

        public native String getHostByAddr(byte[] addr) throws UnknownHostException;

      which takes a "byte[]"..

      Java_java_net_Inet4AddressImpl_getHostByAddr has the same problem. I have not looked at the comments on any of the other JNI implementations.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Use the source!


      REPRODUCIBILITY :
      This bug can be reproduced always.

      Attachments

        Activity

          People

            vtewari Vyom Tewari
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: