Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8205865 | 11.0.1 | Goetz Lindenmaier | P4 | Resolved | Fixed | team |
Print the problematic types in ArrayStoreException.
When doing arraycopy:
"arraycopy: type mismatch: can not copy double[] into object array[]"
"arraycopy: type mismatch: can not copy object array[] into boolean[]"
For Object arrays, be more precise:
If one of the objects passed to araycopy is not an array at all:
"arraycopy: source type java.lang.String is not an array"
"arraycopy: destination type java.lang.String is not an array"
If the element types of the array mismatch:
"arraycopy: type mismatch: can not copy java.lang.String[] into java.util.Date[]"
If one of the elements of source can not be cast to the type of the destination:
"arraycopy: element type mismatch: can not cast one of the elements of java.lang.Object[] to the type of the destination array, java.util.Date"
For JNI call to SetObjectArrayElement() print types and index:
"type mismatch: can not store java.lang.String to java.util.Date[0]"
"type mismatch: can not store java.lang.String to java.lang.Object[1][][]"
When doing arraycopy:
"arraycopy: type mismatch: can not copy double[] into object array[]"
"arraycopy: type mismatch: can not copy object array[] into boolean[]"
For Object arrays, be more precise:
If one of the objects passed to araycopy is not an array at all:
"arraycopy: source type java.lang.String is not an array"
"arraycopy: destination type java.lang.String is not an array"
If the element types of the array mismatch:
"arraycopy: type mismatch: can not copy java.lang.String[] into java.util.Date[]"
If one of the elements of source can not be cast to the type of the destination:
"arraycopy: element type mismatch: can not cast one of the elements of java.lang.Object[] to the type of the destination array, java.util.Date"
For JNI call to SetObjectArrayElement() print types and index:
"type mismatch: can not store java.lang.String to java.util.Date[0]"
"type mismatch: can not store java.lang.String to java.lang.Object[1][][]"
- backported by
-
JDK-8205865 Improve message of ArrayStoreException.
- Resolved
- relates to
-
JDK-8205147 Intermittent crash in runtime/exceptionMsgs/ArrayStoreException/ArrayStoreExceptionTest.java
- Closed
-
JDK-8205141 runtime/exceptionMsgs/ArrayStoreException/ArrayStoreExceptionTest.java failed with "assert(k->is_objArray_klass()) failed: cast to ObjArrayKlass"
- Closed