mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8322782: Clean up usages of unnecessary fully qualified class name "java.util.Arrays"
Reviewed-by: alanb, aivanov
This commit is contained in:
parent
4db7a1c3bb
commit
1369c545ac
9 changed files with 29 additions and 29 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -85,7 +85,7 @@ final class DESKey implements SecretKey {
|
|||
// Use the cleaner to zero the key when no longer referenced
|
||||
final byte[] k = this.key;
|
||||
CleanerFactory.cleaner().register(this,
|
||||
() -> java.util.Arrays.fill(k, (byte)0x00));
|
||||
() -> Arrays.fill(k, (byte)0x00));
|
||||
}
|
||||
|
||||
public byte[] getEncoded() {
|
||||
|
@ -136,7 +136,7 @@ final class DESKey implements SecretKey {
|
|||
|
||||
byte[] thatKey = that.getEncoded();
|
||||
boolean ret = MessageDigest.isEqual(this.key, thatKey);
|
||||
java.util.Arrays.fill(thatKey, (byte)0x00);
|
||||
Arrays.fill(thatKey, (byte)0x00);
|
||||
return ret;
|
||||
} finally {
|
||||
// prevent this from being cleaned for the above block
|
||||
|
@ -168,7 +168,7 @@ final class DESKey implements SecretKey {
|
|||
// Use the cleaner to zero the key when no longer referenced
|
||||
final byte[] k = this.key;
|
||||
CleanerFactory.cleaner().register(this,
|
||||
() -> java.util.Arrays.fill(k, (byte)0x00));
|
||||
() -> Arrays.fill(k, (byte)0x00));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -87,7 +87,7 @@ final class DESedeKey implements SecretKey {
|
|||
// Use the cleaner to zero the key when no longer referenced
|
||||
final byte[] k = this.key;
|
||||
CleanerFactory.cleaner().register(this,
|
||||
() -> java.util.Arrays.fill(k, (byte)0x00));
|
||||
() -> Arrays.fill(k, (byte)0x00));
|
||||
}
|
||||
|
||||
public byte[] getEncoded() {
|
||||
|
@ -137,7 +137,7 @@ final class DESedeKey implements SecretKey {
|
|||
|
||||
byte[] thatKey = that.getEncoded();
|
||||
boolean ret = MessageDigest.isEqual(this.key, thatKey);
|
||||
java.util.Arrays.fill(thatKey, (byte)0x00);
|
||||
Arrays.fill(thatKey, (byte)0x00);
|
||||
return ret;
|
||||
} finally {
|
||||
// prevent this from being cleaned for the above block
|
||||
|
@ -162,7 +162,7 @@ final class DESedeKey implements SecretKey {
|
|||
}
|
||||
byte[] temp = key;
|
||||
this.key = temp.clone();
|
||||
java.util.Arrays.fill(temp, (byte)0x00);
|
||||
Arrays.fill(temp, (byte)0x00);
|
||||
|
||||
DESKeyGenerator.setParityBit(key, 0);
|
||||
DESKeyGenerator.setParityBit(key, 8);
|
||||
|
@ -171,7 +171,7 @@ final class DESedeKey implements SecretKey {
|
|||
// Use the cleaner to zero the key when no longer referenced
|
||||
final byte[] k = this.key;
|
||||
CleanerFactory.cleaner().register(this,
|
||||
() -> java.util.Arrays.fill(k, (byte)0x00));
|
||||
() -> Arrays.fill(k, (byte)0x00));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -84,7 +84,7 @@ final class PBEKey implements SecretKey {
|
|||
// Use the cleaner to zero the key when no longer referenced
|
||||
final byte[] k = this.key;
|
||||
cleanable = CleanerFactory.cleaner().register(this,
|
||||
() -> java.util.Arrays.fill(k, (byte)0x00));
|
||||
() -> Arrays.fill(k, (byte)0x00));
|
||||
}
|
||||
|
||||
public byte[] getEncoded() {
|
||||
|
@ -196,7 +196,7 @@ final class PBEKey implements SecretKey {
|
|||
// Use cleaner to zero the key when no longer referenced
|
||||
final byte[] k = this.key;
|
||||
cleanable = CleanerFactory.cleaner().register(this,
|
||||
() -> java.util.Arrays.fill(k, (byte)0x00));
|
||||
() -> Arrays.fill(k, (byte)0x00));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -190,7 +190,7 @@ class Invokers {
|
|||
|
||||
private boolean checkInvoker(MethodHandle invoker) {
|
||||
assert(targetType.invokerType().equals(invoker.type()))
|
||||
: java.util.Arrays.asList(targetType, targetType.invokerType(), invoker);
|
||||
: Arrays.asList(targetType, targetType.invokerType(), invoker);
|
||||
assert(invoker.internalMemberName() == null ||
|
||||
invoker.internalMemberName().getMethodType().equals(targetType));
|
||||
assert(!invoker.isVarargsCollector());
|
||||
|
@ -200,7 +200,7 @@ class Invokers {
|
|||
private boolean checkVarHandleInvoker(MethodHandle invoker) {
|
||||
MethodType invokerType = targetType.insertParameterTypes(0, VarHandle.class);
|
||||
assert(invokerType.equals(invoker.type()))
|
||||
: java.util.Arrays.asList(targetType, invokerType, invoker);
|
||||
: Arrays.asList(targetType, invokerType, invoker);
|
||||
assert(invoker.internalMemberName() == null ||
|
||||
invoker.internalMemberName().getMethodType().equals(targetType));
|
||||
assert(!invoker.isVarargsCollector());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -1774,7 +1774,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
|
|||
carry = product >>> 32;
|
||||
}
|
||||
if (carry == 0L) {
|
||||
rmag = java.util.Arrays.copyOfRange(rmag, 1, rmag.length);
|
||||
rmag = Arrays.copyOfRange(rmag, 1, rmag.length);
|
||||
} else {
|
||||
rmag[rstart] = (int)carry;
|
||||
}
|
||||
|
@ -1819,7 +1819,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
|
|||
rmag[0] = (int)carry;
|
||||
}
|
||||
if (carry == 0L)
|
||||
rmag = java.util.Arrays.copyOfRange(rmag, 1, rmag.length);
|
||||
rmag = Arrays.copyOfRange(rmag, 1, rmag.length);
|
||||
return new BigInteger(rmag, rsign);
|
||||
}
|
||||
|
||||
|
@ -4593,7 +4593,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
|
|||
// Find first nonzero byte
|
||||
for (keep = 0; keep < vlen && val[keep] == 0; keep++)
|
||||
;
|
||||
return java.util.Arrays.copyOfRange(val, keep, vlen);
|
||||
return Arrays.copyOfRange(val, keep, vlen);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4607,7 +4607,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
|
|||
// Find first nonzero byte
|
||||
for (keep = 0; keep < vlen && val[keep] == 0; keep++)
|
||||
;
|
||||
return keep == 0 ? val : java.util.Arrays.copyOfRange(val, keep, vlen);
|
||||
return keep == 0 ? val : Arrays.copyOfRange(val, keep, vlen);
|
||||
}
|
||||
|
||||
private static int[] stripLeadingZeroBytes(byte[] a, int from, int len) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -204,7 +204,7 @@ public class FtpClient extends sun.net.ftp.FtpClient {
|
|||
47, 63, 58, 64, 38, 61, 43, 36, 44};
|
||||
|
||||
byte[] b = chkS.getBytes(encoding);
|
||||
return java.util.Arrays.equals(b, chkB);
|
||||
return Arrays.equals(b, chkB);
|
||||
}
|
||||
|
||||
private class DefaultParser implements FtpDirParser {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue