8272626: Avoid C-style array declarations in java.*

Reviewed-by: dfuchs, alanb
This commit is contained in:
Claes Redestad 2021-08-18 10:47:03 +00:00
parent e8f1219d6f
commit 30b0f820ce
54 changed files with 140 additions and 140 deletions

View file

@ -102,7 +102,7 @@ public class ByteArrayInputStream extends InputStream {
*
* @param buf the input buffer.
*/
public ByteArrayInputStream(byte buf[]) {
public ByteArrayInputStream(byte[] buf) {
this.buf = buf;
this.pos = 0;
this.count = buf.length;
@ -122,7 +122,7 @@ public class ByteArrayInputStream extends InputStream {
* @param offset the offset in the buffer of the first byte to read.
* @param length the maximum number of bytes to read from the buffer.
*/
public ByteArrayInputStream(byte buf[], int offset, int length) {
public ByteArrayInputStream(byte[] buf, int offset, int length) {
this.buf = buf;
this.pos = offset;
this.count = Math.min(offset + length, buf.length);
@ -173,7 +173,7 @@ public class ByteArrayInputStream extends InputStream {
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
*/
public synchronized int read(byte b[], int off, int len) {
public synchronized int read(byte[] b, int off, int len) {
Objects.checkFromIndexSize(off, len, b.length);
if (pos >= count) {