-
Bug
-
Resolution: Fixed
-
P4
-
hs25, 8, 9
-
b14
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8250832 | openjdk8u272 | Coleen Phillimore | P4 | Resolved | Fixed | b02 |
JDK-8249419 | 8u271 | David Buck | P4 | Resolved | Fixed | b02 |
JDK-8251623 | emb-8u271 | David Buck | P4 | Resolved | Fixed | team |
As shown in JDK-8023122 subsequent failed class resolution attempts have different detail messages:
$ cat ExtTest.java
class ExtTest {
public static void main(String args[]) {
try {
Property p = new Property();
} catch (NoClassDefFoundError e) {
System.out.println(e);
}
try {
Property p = new Property();
} catch (NoClassDefFoundError e) {
System.out.println(e);
}
}
}
$ java -Xint ExtTest
java.lang.NoClassDefFoundError: PropertyChild
java.lang.NoClassDefFoundError: Property
The fix would be to report the to-be resolved class in the initial exception as well:
diff -r acedd49a1bce src/share/vm/classfile/systemDictionary.cpp
--- a/src/share/vm/classfile/systemDictionary.cpp Thu Aug 08 03:16:56 2013 +0200
+++ b/src/share/vm/classfile/systemDictionary.cpp Fri Aug 23 16:09:04 2013 -0700
@@ -385,7 +385,7 @@ Klass* SystemDictionary::resolve_super_o
}
if (HAS_PENDING_EXCEPTION || superk_h() == NULL) {
// can null superk
- superk_h = KlassHandle(THREAD, handle_resolution_exception(class_name, class_loader, protection_domain, true, superk_h, THREAD));
+ superk_h = KlassHandle(THREAD, handle_resolution_exception(child_name, class_loader, protection_domain, true, superk_h, THREAD));
}
return superk_h();
$ cat ExtTest.java
class ExtTest {
public static void main(String args[]) {
try {
Property p = new Property();
} catch (NoClassDefFoundError e) {
System.out.println(e);
}
try {
Property p = new Property();
} catch (NoClassDefFoundError e) {
System.out.println(e);
}
}
}
$ java -Xint ExtTest
java.lang.NoClassDefFoundError: PropertyChild
java.lang.NoClassDefFoundError: Property
The fix would be to report the to-be resolved class in the initial exception as well:
diff -r acedd49a1bce src/share/vm/classfile/systemDictionary.cpp
--- a/src/share/vm/classfile/systemDictionary.cpp Thu Aug 08 03:16:56 2013 +0200
+++ b/src/share/vm/classfile/systemDictionary.cpp Fri Aug 23 16:09:04 2013 -0700
@@ -385,7 +385,7 @@ Klass* SystemDictionary::resolve_super_o
}
if (HAS_PENDING_EXCEPTION || superk_h() == NULL) {
// can null superk
- superk_h = KlassHandle(THREAD, handle_resolution_exception(class_name, class_loader, protection_domain, true, superk_h, THREAD));
+ superk_h = KlassHandle(THREAD, handle_resolution_exception(child_name, class_loader, protection_domain, true, superk_h, THREAD));
}
return superk_h();
- backported by
-
JDK-8249419 failed class resolution reports different class name in detail message for the first and subsequent times
- Resolved
-
JDK-8250832 failed class resolution reports different class name in detail message for the first and subsequent times
- Resolved
-
JDK-8251623 failed class resolution reports different class name in detail message for the first and subsequent times
- Resolved