Skip to content

Commit f0482ac

Browse files
committedJan 23, 2018
initialize list with known size
1 parent ae272b1 commit f0482ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/org/jcodings/unicode/UnicodeEncoding.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ static ArrayList<int[]> read() {
732732
try {
733733
DataInputStream dis = ArrayReader.openStream("CaseMappingSpecials");
734734
int size = dis.readInt();
735-
ArrayList<int[]> values = new ArrayList<int[]>();
735+
ArrayList<int[]> values = new ArrayList<int[]>(size);
736736
for (int i = 0; i < size; i++) {
737737
int packed = dis.readInt();
738738
int length = packed >>> Config.SpecialsLengthOffset;

0 commit comments

Comments
 (0)
Please sign in to comment.