-
Bug
-
Resolution: Won't Fix
-
P4
-
1.4.0, 1.4.2, 5.0
-
generic, sparc
-
generic, solaris_7
Name: abR10010 Date: 11/24/2000
The Java Debug Interface specification for ReferenceType.visibleMethods()
method says:
"...
Returns a list containing each Method declared or inherited by
this type. Methods from superclasses or superinterfaces that
have been hidden or overridden are not included.
Note that despite this exclusion, multiple inherited methods
with the same signature can be present in the returned list,
but at most one can be a member of a ClassType. See JLS section
8.4.6 for details.
..."
In turn the Java Language Specification section 8.4.6 says:
"...
8.4.6.4 Inheriting Methods with the Same Signature
...
*If none of the inherited methods is not abstract, then the class is necessaryly
an abstract class and it considered to inherit all the abstract methods.
..."
But the nsk/jdi/ReferenceType/visibleMethods/visibmethod005 test
shows that the visibleMethods() method does not return all multipe
inherited abstract method. The returned by visibleMethods() List
contains only one abstract method inherited from one super interface but
in according with the specification this List should contain
two abstract methods inherited from both super interfaces extended
by the checked interface.
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-b41/solsparc
java version "1.4.0beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0beta-b41)
Java HotSpot(TM) Client VM (build 1.4beta-B41, mixed mode)
==> nsk/jdi/ReferenceType/visibleMethods/visibmethod005 test LOG:
==> test checks visibleMethods() method of ReferenceType interface
of the com.sun.jdi package for multiple inherited abstract methods
--> visibmethod005: check ReferenceType.visibleMethods() method for debugee's InterfaceForCheck class...
##> visibmethod005: FAILED: method is NOT visible: i_multiple_inherited_abstract_method (SuperInterfaceForCheck_1)
--> visibmethod005: check completed!
--> visibmethod005: expected visible methods number = 2
--> visibmethod005: in fact visible methods number = 1
--> visibmethod005: expected and in fact visible methods number = 1
##> visibmethod005: NOT visible methods number = 1
##> visibmethod005: UNEXPECTED visible methods number = 0
==> nsk/jdi/ReferenceType/visibleMethods/visibmethod005 test FAILED
See the declaration of the interface used by the nsk visibmethod005 test:
===============================
interface InterfaceForCheck extends SuperInterfaceForCheck_1, SuperInterfaceForCheck_2 {
}
interface SuperInterfaceForCheck_1 {
Object i_multiple_inherited_abstract_method(Object obj);
}
interface SuperInterfaceForCheck_2 {
Object i_multiple_inherited_abstract_method(Object obj);
}
===============================
======================================================================