RFR: 8255150: Add utility methods to check long indexes and ranges [v2]

Roland Westrelin roland at openjdk.java.net
Thu Nov 5 15:47:32 UTC 2020

On Thu, 5 Nov 2020 11:58:43 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> Although I'm not a 'Reviewer', I've done a pass over the code and left some inline comments that I hope you find useful.

Thanks for the review! All suggestions (except the exception message one that I commented on) look good to me. I applied them.

> src/java.base/share/classes/java/lang/IndexOutOfBoundsException.java line 83:
>> 81:      */
>> 82:     public IndexOutOfBoundsException(long index) {
>> 83:         super("Index out of range: " + index);
> For consistency with the class name:
> Suggestion:
>         super("Index out of bounds: " + index);

Not sure about that one as it's a copy of the message from IndexOutOfBoundsException(int index). Both would need to be changed for consistency.


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

More information about the core-libs-dev mailing list