-
Bug
-
Resolution: Fixed
-
P3
-
repo-valhalla
To reproduce, uncomment the assert on the array class name, it returns an incorrect name:
java.lang.AssertionError: unexpected name: [LHiddenClass+0x0000000139190040; expected [true] but found [false]
diff --git a/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java b/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java
--- a/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java
+++ b/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java
@@ -129,7 +129,7 @@
assertTrue(arrayType.isArray());
assertTrue(Array.getLength(array) == 2);
assertFalse(arrayType.isHiddenClass());
- // assertTrue(arrayType.getName().startsWith("[LHiddenClass/"), "unexpected name: " + arrayType.getName());
+ assertTrue(arrayType.getName().startsWith("[LHiddenClass/"), "unexpected name: " + arrayType.getName());
assertTrue(arrayType.getComponentType().isHiddenClass());
assertTrue(arrayType.getComponentType() == type);
java.lang.AssertionError: unexpected name: [LHiddenClass+0x0000000139190040; expected [true] but found [false]
diff --git a/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java b/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java
--- a/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java
+++ b/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java
@@ -129,7 +129,7 @@
assertTrue(arrayType.isArray());
assertTrue(Array.getLength(array) == 2);
assertFalse(arrayType.isHiddenClass());
- // assertTrue(arrayType.getName().startsWith("[LHiddenClass/"), "unexpected name: " + arrayType.getName());
+ assertTrue(arrayType.getName().startsWith("[LHiddenClass/"), "unexpected name: " + arrayType.getName());
assertTrue(arrayType.getComponentType().isHiddenClass());
assertTrue(arrayType.getComponentType() == type);
- relates to
-
JDK-8230502 Add support in JVM TI, JDI, and Instrumentation for hidden classes
- Closed