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

[lworld] ClassCastException thrown for JCK test instead of expected IllegalArgumentException

      This program, based on JCK-11 test api/java_lang/reflect/Array/GetSetArrayTests.java, throws an IllegalArgumentException in jdk-latest, but a ClassCastException in lworld:

      import java.lang.reflect.*;

      public class ArraySet {

          public static void main(String argv[]) throws Throwable {
              try {
                  Integer array[] = { new Integer(1), new Integer(2), new Integer(3) };
                  Array.set( array, 2, new Byte((byte) 5) );
              } catch (Exception e) {
                  System.out.println("e: " + e.toString());
              }
          }
      }

      The issue occurs with and without the EnableValhalla option.

            rriggs Roger Riggs
            hseigel Harold Seigel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: