On Tue, 8 Oct 2024 19:42:14 GMT, Mandy Chung <mch...@openjdk.org> wrote:

>> Chen Liang has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   mlchung suggestions: elementType, improve utility methods
>
> src/java.base/share/classes/jdk/internal/constant/ConstantUtils.java line 313:
> 
>> 311:             throw new IllegalArgumentException("rank " + rank + " is 
>> not a positive value");
>> 312:         }
>> 313:     }
> 
> Suggest to inline the rank argument check in the caller method which makes 
> the check explicit to the reader.

So like `if (rank <= 0) throw ConstantUtils.rankNotPositive(rank);` at 
individual use sites?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20665#discussion_r1792507736

Reply via email to