mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8321059: Unneeded array assignments in MergeCollation and CompactByteArray
Reviewed-by: jlu, bpb, rriggs
This commit is contained in:
parent
d568562966
commit
f6be7fdf22
2 changed files with 5 additions and 6 deletions
|
@ -39,6 +39,8 @@
|
|||
package sun.text;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* class CompactATypeArray : use only on primitive data types
|
||||
* Provides a compact way to store information that is indexed by Unicode
|
||||
|
@ -77,12 +79,11 @@ public final class CompactByteArray implements Cloneable {
|
|||
values = new byte[UNICODECOUNT];
|
||||
indices = new short[INDEXCOUNT];
|
||||
hashes = new int[INDEXCOUNT];
|
||||
for (i = 0; i < UNICODECOUNT; ++i) {
|
||||
values[i] = defaultValue;
|
||||
if (defaultValue != (byte)0) {
|
||||
Arrays.fill(values, defaultValue);
|
||||
}
|
||||
for (i = 0; i < INDEXCOUNT; ++i) {
|
||||
indices[i] = (short)(i<<BLOCKSHIFT);
|
||||
hashes[i] = 0;
|
||||
}
|
||||
isCompact = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue