Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8238663

[nestmates] array type of hidden class returns incorrect name

XMLWordPrintable

      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);

            hseigel Harold Seigel (Inactive)
            mchung Mandy Chung
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: