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

JDI: ReferenceType.visibleMethods() returns methods with invalid declaring class

XMLWordPrintable

    • sparc
    • solaris_7



      Name: abR10010 Date: 11/26/2000



      The nsk/jdi/ReferenceType/visibleMethods/visibmethod001 test
      shows that the visibleMethods() method for checked class returns methods
      inherited by this class from the implemented interface and these methods
      have the checked class as the declaring class.
      But the visibmethod001 test expects that these methods should
      have the implemented interface as the declaring class.
      Note, these methods are not declared in the checked class itself.

      This happens on both Soalris-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/visibleMethods/visibmethod001 test LOG:
      ==> test checks visibleMethods() method of ReferenceType interface
          of the com.sun.jdi package

      --> visibmethod001: check ReferenceType.visibleMethods() method for debugee's ClassForCheck class...
      ##> visibmethod001: FAILED: method is NOT visible: i_interf_ref_method (InterfaceForCheck)
      ##> visibmethod001: FAILED: method is NOT visible: i_interf_prim_method (InterfaceForCheck)
      ##> visibmethod001: FAILED: method is NOT visible: i_interf_void_method (InterfaceForCheck)
      ##> visibmethod001: FAILED: unexpected visible method: i_interf_ref_method (ClassForCheck)
      ##> visibmethod001: FAILED: unexpected visible method: i_interf_prim_method (ClassForCheck)
      ##> visibmethod001: FAILED: unexpected visible method: i_interf_void_method (ClassForCheck)
      --> visibmethod001: check completed!
      --> visibmethod001: expected visible methods number = 92
      --> visibmethod001: in fact visible methods number = 92
      --> visibmethod001: expected and in fact visible methods number = 89
      ##> visibmethod001: NOT visible methods number = 3
      ##> visibmethod001: UNEXPECTED visible methods number = 3

      ==> nsk/jdi/ReferenceType/visibleMethods/visibmethod001 test FAILED



      See the fragment of declaration of the checked class used by
      the nsk visibmethod001 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);

          ...

      }

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

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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: