mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +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
|
@ -4265,7 +4265,7 @@ public class Arrays {
|
|||
* @return a content-based hash code for {@code a}
|
||||
* @since 1.5
|
||||
*/
|
||||
public static int hashCode(long a[]) {
|
||||
public static int hashCode(long[] a) {
|
||||
if (a == null)
|
||||
return 0;
|
||||
|
||||
|
@ -4294,7 +4294,7 @@ public class Arrays {
|
|||
* @return a content-based hash code for {@code a}
|
||||
* @since 1.5
|
||||
*/
|
||||
public static int hashCode(int a[]) {
|
||||
public static int hashCode(int[] a) {
|
||||
if (a == null)
|
||||
return 0;
|
||||
|
||||
|
@ -4321,7 +4321,7 @@ public class Arrays {
|
|||
* @return a content-based hash code for {@code a}
|
||||
* @since 1.5
|
||||
*/
|
||||
public static int hashCode(short a[]) {
|
||||
public static int hashCode(short[] a) {
|
||||
if (a == null)
|
||||
return 0;
|
||||
|
||||
|
@ -4348,7 +4348,7 @@ public class Arrays {
|
|||
* @return a content-based hash code for {@code a}
|
||||
* @since 1.5
|
||||
*/
|
||||
public static int hashCode(char a[]) {
|
||||
public static int hashCode(char[] a) {
|
||||
if (a == null)
|
||||
return 0;
|
||||
|
||||
|
@ -4375,7 +4375,7 @@ public class Arrays {
|
|||
* @return a content-based hash code for {@code a}
|
||||
* @since 1.5
|
||||
*/
|
||||
public static int hashCode(byte a[]) {
|
||||
public static int hashCode(byte[] a) {
|
||||
if (a == null)
|
||||
return 0;
|
||||
|
||||
|
@ -4402,7 +4402,7 @@ public class Arrays {
|
|||
* @return a content-based hash code for {@code a}
|
||||
* @since 1.5
|
||||
*/
|
||||
public static int hashCode(boolean a[]) {
|
||||
public static int hashCode(boolean[] a) {
|
||||
if (a == null)
|
||||
return 0;
|
||||
|
||||
|
@ -4429,7 +4429,7 @@ public class Arrays {
|
|||
* @return a content-based hash code for {@code a}
|
||||
* @since 1.5
|
||||
*/
|
||||
public static int hashCode(float a[]) {
|
||||
public static int hashCode(float[] a) {
|
||||
if (a == null)
|
||||
return 0;
|
||||
|
||||
|
@ -4456,7 +4456,7 @@ public class Arrays {
|
|||
* @return a content-based hash code for {@code a}
|
||||
* @since 1.5
|
||||
*/
|
||||
public static int hashCode(double a[]) {
|
||||
public static int hashCode(double[] a) {
|
||||
if (a == null)
|
||||
return 0;
|
||||
|
||||
|
@ -4489,7 +4489,7 @@ public class Arrays {
|
|||
* @see #deepHashCode(Object[])
|
||||
* @since 1.5
|
||||
*/
|
||||
public static int hashCode(Object a[]) {
|
||||
public static int hashCode(Object[] a) {
|
||||
if (a == null)
|
||||
return 0;
|
||||
|
||||
|
@ -4530,7 +4530,7 @@ public class Arrays {
|
|||
* @see #hashCode(Object[])
|
||||
* @since 1.5
|
||||
*/
|
||||
public static int deepHashCode(Object a[]) {
|
||||
public static int deepHashCode(Object[] a) {
|
||||
if (a == null)
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ class JarVerifier {
|
|||
/** collect -DIGEST-MANIFEST values for deny list */
|
||||
private List<Object> manifestDigests;
|
||||
|
||||
public JarVerifier(String name, byte rawBytes[]) {
|
||||
public JarVerifier(String name, byte[] rawBytes) {
|
||||
manifestName = name;
|
||||
manifestRawBytes = rawBytes;
|
||||
sigFileSigners = new Hashtable<>();
|
||||
|
@ -466,7 +466,7 @@ class JarVerifier {
|
|||
}
|
||||
}
|
||||
|
||||
public int read(byte b[], int off, int len) throws IOException {
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
ensureOpen();
|
||||
if ((numLeft > 0) && (numLeft < len)) {
|
||||
len = (int)numLeft;
|
||||
|
|
|
@ -289,7 +289,7 @@ public final class Matcher implements MatchResult {
|
|||
private final String text;
|
||||
|
||||
ImmutableMatchResult(int first, int last, int groupCount,
|
||||
int groups[], String text)
|
||||
int[] groups, String text)
|
||||
{
|
||||
this.first = first;
|
||||
this.last = last;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue