8219876: (bf) Improve IndexOutOfBoundsException messages in $Type$Buffer classes

Reviewed-by: alanb, rriggs
This commit is contained in:
Brian Burkhalter 2019-03-15 16:24:07 -07:00
parent 5c5089b0a2
commit 7211761cab
6 changed files with 14 additions and 27 deletions

View file

@ -731,11 +731,6 @@ public abstract class Buffer {
mark = -1;
}
static void checkBounds(int off, int len, int size) { // package-private
if ((off | len | (off + len) | (size - (off + len))) < 0)
throw new IndexOutOfBoundsException();
}
static {
// setup access to this package in SharedSecrets
SharedSecrets.setJavaNioAccess(