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

JDI: ReferenceType.allMethods() returns twice methods inherited from interface

XMLWordPrintable

    • sparc
    • solaris_7



      Name: abR10010 Date: 12/03/2000



      The nsk/jdi/ReferenceType/allMethods/allmethods001 test
      shows that the allMethods() method for checked class returns methods
      inherited by this class from the implemented interface twice.
      Note, these methods are not declared in the checked class itself.

      For each such method the first returned method has the checked class
      as the declaring class and the second method has the implemented interface
      as the declaring class.
      It should happen only if the checked class overrides methods inherited from
      the implemented interface.

      The allmethods001 test expects that only one method should be returned
      by the allMethods() method and the returned method should have the implemented
      interface as the declaring class.

      This happens on both Solaris-Sparc and Win32.

      To reproduce the bug on Solaris run doit.sh in
      /net/sqesvr/export/vsn/GammaBase/Bugs/<this bug number>.

      The first parameter for doit.sh should be JDK root directory
      (e.g. /java/jdk1.4/solsparc) and the other parameter(s) -
      VM option(s) (optional).
        
      See log:

      % doit.sh /export/java/dest/jdk1.4.0beta-b42/solsparc
      java version "1.4.0beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0beta-b42)
      Java HotSpot(TM) Client VM (build 1.4beta-B42, mixed mode)
      ==> nsk/jdi/ReferenceType/allMethods/allmethods001 test LOG:
      ==> test checks allMethods() method of ReferenceType interface
          of the com.sun.jdi package

      --> allmethods001: check ReferenceType.allMethods() method for debugee's ClassForCheck class...
      ##> allmethods001: FAILED: unexpected found method: i_interf_ref_method (ClassForCheck)
      ##> allmethods001: FAILED: unexpected found method: i_interf_prim_method (ClassForCheck)
      ##> allmethods001: FAILED: unexpected found method: i_interf_void_method (ClassForCheck)
      --> allmethods001: check completed!
      --> allmethods001: expected found methods number = 112
      --> allmethods001: in fact found methods number = 115
      --> allmethods001: expected and in fact found methods number = 112
      ##> allmethods001: NOT found methods number = 0
      ##> allmethods001: UNEXPECTED found methods number = 3

      ==> nsk/jdi/ReferenceType/allMethods/allmethods001 test FAILED



      See the fragment of declaration of the checked class used by
      the nsk allmethods001 test:

      ===============================
      abstract class ClassForCheck extends SuperClassForCheck implements InterfaceForCheck {

          ...

      }

      abstract class SuperClassForCheck {

          ...

      }

      interface InterfaceForCheck {

          void i_interf_void_method(long l);
          long i_interf_prim_method(long l);
          Object i_interf_ref_method(Object obj);

          ...

      }


      ===============================

      ======================================================================

            Unassigned Unassigned
            bondsunw Bond Bond (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: