-
Bug
-
Resolution: Won't Fix
-
P4
-
1.4.0
-
sparc
-
solaris_7
Name: abR10010 Date: 12/03/2000
The Java Debug Interface specification for ReferenceType.methods()
method says:
"...
Returns a list containing each Method declared directly in this type.
Inherited methods are not included.
..."
But the nsk/jdi/ReferenceType/methods/methods001 test
shows that the ReferenceType.methods() method for checked
class returns methods inherited by this class from the
implemented interface but not declared in the checked class itself.
Moreover the each such method has the checked class instead
of the implemented interface as the declaring class.
For the methods inherited by checked class from the extended super class
the methods() method runs correctly: these methods are not included in
the Methods List returned by the methods() method.
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/methods/methods001 test LOG:
==> test checks methods() method of ReferenceType interface
of the com.sun.jdi package
--> methods001: check ReferenceType.methods() method for debugee's ClassForCheck class...
##> methods001: FAILED: unexpected found method: i_interf_ref_method (ClassForCheck)
##> methods001: FAILED: unexpected found method: i_interf_prim_method (ClassForCheck)
##> methods001: FAILED: unexpected found method: i_interf_void_method (ClassForCheck)
--> methods001: check completed!
--> methods001: expected found methods number = 82
--> methods001: in fact found methods number = 85
--> methods001: expected and in fact found methods number = 82
##> methods001: NOT found methods number = 0
##> methods001: UNEXPECTED found methods number = 3
==> nsk/jdi/ReferenceType/methods/methods001 test FAILED
See the fragment of declaration of the checked class used by
the nsk methods001 test:
===============================
abstract class ClassForCheck extends SuperClassForCheck implements InterfaceForCheck {
...
}
abstract class SuperClassForCheck {
static void s_super_void_method(long l) {}
static long s_super_prim_method(long l) {return 100;}
static Object s_super_ref_method(Object obj) {return new Object();}
void i_super_void_method(long l) {}
long i_super_prim_method(long l) {return 100;}
Object i_super_ref_method(Object obj) {return new Object();}
...
}
interface InterfaceForCheck {
void i_interf_void_method(long l);
long i_interf_prim_method(long l);
Object i_interf_ref_method(Object obj);
...
}
===============================
======================================================================