-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
14, 15
-
None
-
generic
-
generic
The following code will throw an IllegalArgumentException:
Class<?> c = Object.class;
while (true) {
c = c.arrayType();
}
With the following stack trace:
Exception java.lang.IllegalArgumentException
at Array.newArray (Native Method)
at Array.newInstance (Array.java:78)
at Class.arrayType (Class.java:4358)
at (#2:1)
Class.arrayType does not specify to throw an IllegalArgumentException.
It's specification should be changed to allow it to throw an IllegalStateException, similar to ClassDesc.arrayType().
Class<?> c = Object.class;
while (true) {
c = c.arrayType();
}
With the following stack trace:
Exception java.lang.IllegalArgumentException
at Array.newArray (Native Method)
at Array.newInstance (Array.java:78)
at Class.arrayType (Class.java:4358)
at (#2:1)
Class.arrayType does not specify to throw an IllegalArgumentException.
It's specification should be changed to allow it to throw an IllegalStateException, similar to ClassDesc.arrayType().
- csr for
-
JDK-8262211 Class.arrayType should not throw IllegalArgumentException
-
- Draft
-
- duplicates
-
JDK-8268250 Class.arrayType() for a 255-d array throws undocumented IllegalArgumentException
-
- Resolved
-