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

JNI::GetMethodID fails to retrieve an inherited interface method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.0
    • 1.0
    • hotspot
    • fcs
    • x86
    • windows_nt
    • Not verified



      Name: mm8553 Date: 04/05/99


      We have the following interface:

      package MITI.util;

      public interface MIRIterator extends ListIterator
      {
          // some methods, none of which called hasNext
      }

        Then, we retieve a handle to the interface "MITI/util/MIRIterator" and when we try to get a handle to "hasNext" using JNIEnv::GetMethodID we fail. We call GetMethodID as follows:
        env->GetMethodID(interface_id,"hasNext","()Z");

        The method returns NULL and throws the exception NoSuchMethodError.

        If we specify "java/util/ListIterator" for the interface this method works.

        The JNI 1.1 documentation specifies that GetMethodID can retrieve methods for both classes and interfaces and that it can retrieve inherited methods. Has this changed for Hotspot ?
        We tested our code in the following JVMs:

       * 'Classic VM (build JDK-1.2fcs-S, native threads)',
         'Classic VM (build JDK-1.2-V, native threads)'
         -> GetMethodID works
       * 'HotSpot VM (1.0rc1, mixed mode, build F)',
         'HotSpot VM (1.0rc2, mixed mode, build E)'
         -> GetMethodID does not work
      (Review ID: 56319)
      ======================================================================

            rschmidtsunw Rene Schmidt (Inactive)
            mmuellersunw Marianne Mueller (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: