8291509: Minor cleanup could be done in sun.security

Reviewed-by: weijun
This commit is contained in:
Mark Powers 2022-09-15 19:59:53 +00:00 committed by Weijun Wang
parent 6beeb8471c
commit 4cec141a90
298 changed files with 2650 additions and 3262 deletions

View file

@ -26,7 +26,6 @@
package sun.security.util;
import java.io.ByteArrayOutputStream;
import java.util.Arrays;
import jdk.internal.util.Preconditions;
@ -39,8 +38,8 @@ import jdk.internal.util.Preconditions;
public class BitArray {
private byte[] repn;
private int length;
private final byte[] repn;
private final int length;
private static final int BITS_PER_UNIT = 8;
@ -170,7 +169,7 @@ public class BitArray {
* The bit stored at index zero in this BitArray will be copied
* into the most significant bit of the zeroth element of the
* returned byte array. The last byte of the returned byte array
* will be contain zeros in any bits that do not have corresponding
* will contain zeros in any bits that do not have corresponding
* bits in the BitArray. (This matters only if the BitArray's size
* is not a multiple of 8.)
*/
@ -191,7 +190,7 @@ public class BitArray {
}
/**
* Return a boolean array with the same bit values a this BitArray.
* Return a boolean array with the same bit values in this BitArray.
*/
public boolean[] toBooleanArray() {
boolean[] bits = new boolean[length];