mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8272626: Avoid C-style array declarations in java.*
Reviewed-by: dfuchs, alanb
This commit is contained in:
parent
e8f1219d6f
commit
30b0f820ce
54 changed files with 140 additions and 140 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue