mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +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));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue