Skip to content

Commit f23eb0d

Browse files
committed
work around getTrueSet() issue
- getTrueSet() threw an exception about being of type UNKNOWN (the type field was uninitialized) - I changed the calls to .getSet("Yes", null) and it "works"
1 parent af2431d commit f23eb0d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Diff for: UnicodeJsps/src/main/java/org/unicode/jsp/XPropertyFactory.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static synchronized XPropertyFactory make() {
3939
singleton = new XPropertyFactory();
4040
return singleton;
4141
}
42-
42+
4343
public final Factory add2(UnicodeProperty sp) {
4444
UnicodeProperty already = getProperty(sp.getName());
4545
if (already== null) {
@@ -49,8 +49,8 @@ public final Factory add2(UnicodeProperty sp) {
4949
return this;
5050
}
5151
}
52-
53-
{
52+
53+
{
5454
ICUPropertyFactory base = ICUPropertyFactory.make();
5555
for (String propertyAlias : (List<String>)base.getInternalAvailablePropertyAliases(new ArrayList())) {
5656
add(base.getProperty(propertyAlias));
@@ -150,17 +150,17 @@ public String transform(Integer source) {
150150
.setMain("Script_Extensions", "scx", UnicodeProperty.ENUMERATED, "1.1")
151151
.addValueAliases(ScriptTester.getScriptSpecialsAlternates(), false)
152152
);
153-
153+
154154
CachedProps cp = CachedProps.CACHED_PROPS;
155155
for (String prop : cp.getAvailable()) {
156156
add2(cp.getProperty(prop));
157157
}
158-
UnicodeSet Basic_Emoji = cp.getProperty("Basic_Emoji").getTrueSet();
159-
UnicodeSet Emoji_Keycap_Sequence = cp.getProperty("RGI_Emoji_Keycap_Sequence").getTrueSet();
160-
UnicodeSet RGI_Emoji_Modifier_Sequence = cp.getProperty("RGI_Emoji_Modifier_Sequence").getTrueSet();
161-
UnicodeSet RGI_Emoji_Tag_Sequence = cp.getProperty("RGI_Emoji_Tag_Sequence").getTrueSet();
162-
UnicodeSet RGI_Emoji_Flag_Sequence = cp.getProperty("RGI_Emoji_Flag_Sequence").getTrueSet();
163-
UnicodeSet RGI_Emoji_Zwj_Sequence = cp.getProperty("RGI_Emoji_Zwj_Sequence").getTrueSet();
158+
UnicodeSet Basic_Emoji = cp.getProperty("Basic_Emoji").getSet("Yes", null); // TODO: was .getTrueSet();
159+
UnicodeSet Emoji_Keycap_Sequence = cp.getProperty("RGI_Emoji_Keycap_Sequence").getSet("Yes", null); // TODO: was .getTrueSet();
160+
UnicodeSet RGI_Emoji_Modifier_Sequence = cp.getProperty("RGI_Emoji_Modifier_Sequence").getSet("Yes", null); // TODO: was .getTrueSet();
161+
UnicodeSet RGI_Emoji_Tag_Sequence = cp.getProperty("RGI_Emoji_Tag_Sequence").getSet("Yes", null); // TODO: was .getTrueSet();
162+
UnicodeSet RGI_Emoji_Flag_Sequence = cp.getProperty("RGI_Emoji_Flag_Sequence").getSet("Yes", null); // TODO: was .getTrueSet();
163+
UnicodeSet RGI_Emoji_Zwj_Sequence = cp.getProperty("RGI_Emoji_Zwj_Sequence").getSet("Yes", null); // TODO: was .getTrueSet();
164164
UnicodeSet RGI_Emoji = new UnicodeSet()
165165
.add(Basic_Emoji)
166166
.add(Emoji_Keycap_Sequence)
@@ -264,7 +264,7 @@ private void addBytes(StringBuilder builder, int bytes) {
264264
builder.append(' ');
265265
}
266266
first = false;
267-
builder.append(hex);
267+
builder.append(hex);
268268
}
269269
}
270270

0 commit comments

Comments
 (0)