< prev index next >

test/hotspot/jtreg/runtime/LoaderConstraints/duplicateParentLE/Test.java

Print this page
rev 51756 : 8205611: Improve the wording of LinkageErrors to include module and class loader information
Summary: Clean up the wording of loader constraint violations to include the module and class loader information.
Reviewed-by: coleenp, goetz, hseigel

@@ -43,12 +43,13 @@
     // the unique @<id> identity hash which cannot be compared against.
 
     // Check that all names have external formatting ('.' and not '/' in package names).
     // Check for name and parent of class loader. Type should be mentioned as 'class'.
     static String expectedErrorMessage_part1 = "loader 'DuplicateParentLE_Test_Loader' @";
-    static String expectedErrorMessage_part2 = " (instance of PreemptingChildClassLoader, child of ParentClassLoader @";
-    static String expectedErrorMessage_part3 = " ParentClassLoader) attempted duplicate class definition for test.Foo";
+    static String expectedErrorMessage_part2 = " attempted duplicate class definition for test.Foo. (test.Foo is in unnamed module of loader 'DuplicateParentLE_Test_Loader' @";
+    static String expectedErrorMessage_part3 = ", parent loader ParentClassLoader @";
+
 
     // Test that the error message is correct when a loader constraint error is
     // detected during vtable creation.
     //
     // In this test, during vtable creation for class Task, method "Task.m()LFoo;"
< prev index next >