A DESCRIPTION OF THE PROBLEM :
The message computation for the `IllegalArgumentException` that’s thrown when calling `ClassDesc.arrayType(int)` in a way that results in the array type having more than 255 dimensions is incorrect.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached Java program.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The message of the thrown `IllegalArgumentException` should be: “rank: 300”
ACTUAL -
The `IllegalArgumentException` has the message:
```
Exception in thread "main" java.lang.IllegalArgumentException: rank: 100200
at java.base/java.lang.constant.ClassDesc.arrayType(ClassDesc.java:177)
at Test.main(Test.java:7)
```
---------- BEGIN SOURCE ----------
import static java.lang.constant.ConstantDescs.*;
public class Test {
public static void main(final String... args) {
CD_Object
.arrayType(100)
.arrayType(200);
}
}
---------- END SOURCE ----------
FREQUENCY : always
The message computation for the `IllegalArgumentException` that’s thrown when calling `ClassDesc.arrayType(int)` in a way that results in the array type having more than 255 dimensions is incorrect.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached Java program.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The message of the thrown `IllegalArgumentException` should be: “rank: 300”
ACTUAL -
The `IllegalArgumentException` has the message:
```
Exception in thread "main" java.lang.IllegalArgumentException: rank: 100200
at java.base/java.lang.constant.ClassDesc.arrayType(ClassDesc.java:177)
at Test.main(Test.java:7)
```
---------- BEGIN SOURCE ----------
import static java.lang.constant.ConstantDescs.*;
public class Test {
public static void main(final String... args) {
CD_Object
.arrayType(100)
.arrayType(200);
}
}
---------- END SOURCE ----------
FREQUENCY : always
- links to
-
Commit openjdk/jdk/32f8437d
-
Review openjdk/jdk/7812
-
Review(master) openjdk/jdk/7812