Skip to content

Commit 3bcdcd3

Browse files
committedDec 27, 2017
misc cleanup
1 parent f8f7077 commit 3bcdcd3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
 

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,9 @@ private static CaseInsensitiveBytesHash<Integer> initializeCTypeNameTable() {
579579
private static class CodeList {
580580
CodeList(DataInputStream dis) throws IOException {
581581
int packed = dis.readInt();
582-
this.flags = packed & ~Config.CodePointMask;
582+
flags = packed & ~Config.CodePointMask;
583583
int length = packed & Config.CodePointMask;
584-
this.codes = new int[length];
584+
codes = new int[length];
585585
for (int j = 0; j < length; j++) {
586586
codes[j] = dis.readInt();
587587
}
@@ -744,12 +744,13 @@ static ArrayList<int[]> read() {
744744
}
745745
values.add(codes);
746746
}
747+
dis.close();
747748
return values;
748749
} catch (IOException ioe) {
749750
throw new RuntimeException(ioe);
750751
}
751752
}
752753

753-
private static ArrayList<int[]> Values = read();
754+
static final ArrayList<int[]> Values = read();
754755
}
755756
}

‎test/org/jcodings/specific/TestUnicode.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ String caseMap(String fromS, int flags) throws Exception {
3939
IntHolder flagP = new IntHolder();
4040
flagP.value = flags;
4141
int len = enc.caseMap(flagP, from, fromP, from.length, to, 0, to.length);
42-
return new String(to, 0, len);
42+
return new String(to, 0, len, "utf-8");
4343
}
4444

4545
@Test

0 commit comments

Comments
 (0)
Please sign in to comment.