8219876: (bf) Improve IndexOutOfBoundsException messages in $Type$Buffer classes
Brian Burkhalter
brian.burkhalter at oracle.com
Wed Feb 27 21:48:59 UTC 2019
For the issue [1], please review the patch [2] which would replace the package-scope method java.nio.Buffer.checkBounds(offset,count,bound) with java.util.Objects.checkFromIndexSize(offset,count,bound) [3]. The latter method would provide more detail on the IOOBE if it should occur.
Thanks,
Brian
[1] https://bugs.openjdk.java.net/browse/JDK-8219876
[2] http://cr.openjdk.java.net/~bpb/8219876/webrev.00/
[3] https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Objects.html#checkFromIndexSize(int,int,int)
More information about the nio-dev
mailing list