-
Bug
-
Resolution: Fixed
-
P3
-
12, 13, 14
-
b08
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8261240 | 13.0.7 | Ekaterina Vergizova | P3 | Resolved | Fixed | b02 |
JDK-8251493 | 11.0.10-oracle | Daniil Titov | P3 | Resolved | Fixed | b01 |
JDK-8254222 | 11.0.10 | Daniil Titov | P3 | Resolved | Fixed | b01 |
As reported here:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2019-January/057749.html
when a default method is present in a super interface, the information GetClassMethods returns for the sub-interface or implementing class, incorrectly includes an inherited method (not the default method itself!).
This can be seen with a simple modification to an existing test:
TEST: vmTestbase/nsk/jvmti/GetClassMethods/getclmthd007/TestDescription.java
diff -r 3da307766fb1 test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassMethods/getclmthd007.java
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassMethods/getclmthd007.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassMethods/getclmthd007.java
@@ -109,7 +110,11 @@
}
}
-interface OuterInterface1 {
+interface DefaultInterface {
+ default void default_method() { } // should never be seen
+}
+
+interface OuterInterface1 extends DefaultInterface {
int meth_i1();
}
STDOUT:
(7) wrong number of methods: 2, expected: 1
>>> OuterInterface2:
>>> [0]: meth_i1()I <= INHERITED from OuterInterface1
>>> [1]: meth_i2()I
(8) wrong number of methods: 3, expected: 2
>>> OuterClass4:
>>> [0]: <init>()V
>>> [1]: meth_i1()I <= INHERITED from OuterInterface1
>>> [2]: meth_i2()I
http://mail.openjdk.java.net/pipermail/core-libs-dev/2019-January/057749.html
when a default method is present in a super interface, the information GetClassMethods returns for the sub-interface or implementing class, incorrectly includes an inherited method (not the default method itself!).
This can be seen with a simple modification to an existing test:
TEST: vmTestbase/nsk/jvmti/GetClassMethods/getclmthd007/TestDescription.java
diff -r 3da307766fb1 test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassMethods/getclmthd007.java
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassMethods/getclmthd007.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassMethods/getclmthd007.java
@@ -109,7 +110,11 @@
}
}
-interface OuterInterface1 {
+interface DefaultInterface {
+ default void default_method() { } // should never be seen
+}
+
+interface OuterInterface1 extends DefaultInterface {
int meth_i1();
}
STDOUT:
(7) wrong number of methods: 2, expected: 1
>>> OuterInterface2:
>>> [0]: meth_i1()I <= INHERITED from OuterInterface1
>>> [1]: meth_i2()I
(8) wrong number of methods: 3, expected: 2
>>> OuterClass4:
>>> [0]: <init>()V
>>> [1]: meth_i1()I <= INHERITED from OuterInterface1
>>> [2]: meth_i2()I
- backported by
-
JDK-8251493 GetClassMethods is confused by the presence of default methods in super interfaces
-
- Resolved
-
-
JDK-8254222 GetClassMethods is confused by the presence of default methods in super interfaces
-
- Resolved
-
-
JDK-8261240 GetClassMethods is confused by the presence of default methods in super interfaces
-
- Resolved
-
- relates to
-
JDK-8256483 [TESTBUG] serviceability/jvmti/GetClassMethods/libOverpassMethods.c fails to compile on gcc 4.4.x
-
- Resolved
-
(1 links to)