--- old/test/jdk/java/io/ByteArrayInputStream/ReadAllReadNTransferTo.java 2018-03-14 11:34:52.000000000 -0700 +++ new/test/jdk/java/io/ByteArrayInputStream/ReadAllReadNTransferTo.java 2018-03-14 11:34:52.000000000 -0700 @@ -45,30 +45,30 @@ public static void main(String... args) throws IOException { byte[] buf = new byte[SIZE]; random.nextBytes(buf); - int offset = random.nextInt(SIZE/2); - int length = random.nextInt(SIZE - offset); + int position = random.nextInt(SIZE/2); + int size = random.nextInt(SIZE - position); ByteArrayInputStream bais = - new ByteArrayInputStream(buf, offset, length); - int off = random.nextInt(length/2); - int len = random.nextInt(length - off); + new ByteArrayInputStream(buf, position, size); + int off = random.nextInt(size/2); + int len = random.nextInt(size- off); byte[] bN = new byte[off + len]; if (bais.readNBytes(bN, off, len) != len) { throw new RuntimeException("readNBytes return value"); } if (!Arrays.equals(bN, off, off + len, - buf, offset, offset + len)) { + buf, position, position + len)) { throw new RuntimeException("readNBytes content"); } byte[] bAll = bais.readAllBytes(); Objects.requireNonNull(bAll, "readAllBytes return value"); - if (bAll.length != length - len) { + if (bAll.length != size - len) { throw new RuntimeException("readAllBytes return value length"); } if (!Arrays.equals(bAll, 0, bAll.length, - buf, offset + len, offset + len + bAll.length)) { + buf, position + len, position + len + bAll.length)) { throw new RuntimeException("readAllBytes content"); }