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

@ -925,7 +925,7 @@ public class ZipFile implements ZipConstants, Closeable {
return pos;
}
public int read(byte b[], int off, int len) throws IOException {
public int read(byte[] b, int off, int len) throws IOException {
synchronized (ZipFile.this) {
ensureOpenOrZipException();
initDataOffset();

View file

@ -165,7 +165,7 @@ class ZipUtils {
* Fetches unsigned 16-bit value from byte array at specified offset.
* The bytes are assumed to be in Intel (little-endian) byte order.
*/
public static final int get16(byte b[], int off) {
public static final int get16(byte[] b, int off) {
return (b[off] & 0xff) | ((b[off + 1] & 0xff) << 8);
}
@ -173,7 +173,7 @@ class ZipUtils {
* Fetches unsigned 32-bit value from byte array at specified offset.
* The bytes are assumed to be in Intel (little-endian) byte order.
*/
public static final long get32(byte b[], int off) {
public static final long get32(byte[] b, int off) {
return (get16(b, off) | ((long)get16(b, off+2) << 16)) & 0xffffffffL;
}
@ -181,7 +181,7 @@ class ZipUtils {
* Fetches signed 64-bit value from byte array at specified offset.
* The bytes are assumed to be in Intel (little-endian) byte order.
*/
public static final long get64(byte b[], int off) {
public static final long get64(byte[] b, int off) {
return get32(b, off) | (get32(b, off+4) << 32);
}
@ -190,7 +190,7 @@ class ZipUtils {
* The bytes are assumed to be in Intel (little-endian) byte order.
*
*/
public static final int get32S(byte b[], int off) {
public static final int get32S(byte[] b, int off) {
return (get16(b, off) | (get16(b, off+2) << 16));
}