If the java.util.Arrays.asList() API is used to convert an Object[] to Collection, the JDK returns an implementation of java.util.ArrayList that is not cloneable. This results in the following exception:
The method invocation of the method [protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException] on the object [[pkg.A id = xxx]], of class [class java.util.Arrays$ArrayList], triggered an exception. Internal Exception: java.lang.reflect.InvocationTargetException Target Invocation Exception: java.lang.CloneNotSupportedException: java.util.Arrays$ArrayList |
This issue is tracked at https://glassfish.dev.java.net/issues/show_bug.cgi?id=556.