RFR: JDK-8283075: Bad IllegalArgumentException message when calling ClassDesc.arrayType(int) which results in a rank > 255 [v2]

Peter Levart plevart at openjdk.java.net
Tue Mar 15 07:53:46 UTC 2022


On Mon, 14 Mar 2022 21:27:29 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> Improving the exception messages for out-of-supported-range array types.
>> 
>> I'll update copyrights before pushing.
>
> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Respond to review feedback.

Changes requested by plevart (Reviewer).

src/java.base/share/classes/java/lang/constant/ClassDesc.java line 179:

> 177:         int netRank;
> 178:         if (rank <= 0) {
> 179:             throw new IllegalArgumentException("rank " + rank + "is not a positive value");

There's a space missing in the IAE message after the rank number. For example, if rank == 0, the message would be: "rank 0is not positive value" ...

-------------

PR: https://git.openjdk.java.net/jdk/pull/7812


More information about the core-libs-dev mailing list