-
CSR
-
Resolution: Approved
-
P3
-
None
-
minimal
-
Java API
-
SE
Summary
The API for method java.lang.constant.ClassDesc::arrayType(int) is not in sync with its implementation. The spec should be modified to match the method's implementation.
Problem
The API for method java.lang.constant.ClassDesc::arrayType(int) is not in sync with its implementation
Solution
Update the spec of java.lang.constant.ClassDesc::arrayType(int) to throw IAE if rank <= 0
Specification
diff -r 748932cafa41 -r d617bc0baefa src/java.base/share/classes/java/lang/constant/ClassDesc.java
--- a/src/java.base/share/classes/java/lang/constant/ClassDesc.java Wed Feb 20 16:20:53 2019 -0500
+++ b/src/java.base/share/classes/java/lang/constant/ClassDesc.java Wed Feb 20 17:59:47 2019 -0500
@@ -170,7 +170,7 @@
*
* @param rank the rank of the array
* @return a {@linkplain ClassDesc} describing the array type
- * @throws IllegalArgumentException if the rank is less than zero or if the rank of the resulting array type is
+ * @throws IllegalArgumentException if the rank is less than or equal to zero or if the rank of the resulting array type is
* greater than 255
* @jvms 4.4.1 The CONSTANT_Class_info Structure
*/
- csr of
-
JDK-8219480 j.l.c.ClassDesc::arrayType(int rank) throws IllegalArgumentException if rank = 0
-
- Resolved
-