Skip to content

Commit efe9fb5

Browse files
authored
Fix 2 errors in Confusables exposed by change in protectCollections (#35)
1 parent 58c94dc commit efe9fb5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

unicodetools/org/unicode/tools/Confusables.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public UnicodeMap<EnumMap<Style, String>> getChar2data() {
6666
return char2data;
6767
}
6868

69-
final private EnumMap<Style, UnicodeMap<String>> style2RawMapToRepresentative;
69+
final private Map<Style, UnicodeMap<String>> style2RawMapToRepresentative;
7070
final private UnicodeSet hasConfusable = new UnicodeSet();
7171
final private UnicodeMap<EnumMap<Style,String>> char2data = new UnicodeMap<EnumMap<Style,String>>();
7272

@@ -287,7 +287,9 @@ public CodepointToConfusables freeze() {
287287

288288
@Override
289289
public CodepointToConfusables cloneAsThawed() {
290-
throw new UnsupportedOperationException();
290+
CodepointToConfusables result = new CodepointToConfusables();
291+
result.data.putAll(data);
292+
return result;
291293
}
292294

293295
public UnicodeSet get(int cp) {

0 commit comments

Comments
 (0)