Community
Participate
Working Groups
Accessing arrays directly after reading them out of a collection like a Vector leads to a VerifyError using Integration Build I20040907. The problem can be reproduced using the following code: import java.util.Vector; public class VMTest{ public static void main(String[] args){ Vector<Integer[]> v = new Vector<Integer[]>(); Integer[] array1 = new Integer[5]; array1[0] = new Integer(17); array1[1] = new Integer(42); v.add(array1); Integer twentyfour = v.get(0)[1]; // responsible for the crash System.out.println(twentyfour); } } Replacing the line Integer twentyfour = v.get(0)[1]; by the two lines Integer[] array2 = v.get(0); Integer twentyfour = array2[1]; will fix the problem, but i think the original code should work as well... The error message is: java.lang.VerifyError: (class: VMTest, method: main signature: ([Ljava/lang/String;)V) Expecting to find array of objects or arrays on stack Exception in thread "main"
*** This bug has been marked as a duplicate of 73530 ***