Skip to content

Commit

Permalink
work around getTrueSet() issue
Browse files Browse the repository at this point in the history
- 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"
  • Loading branch information
srl295 committed Jul 13, 2021
1 parent af2431d commit f23eb0d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions UnicodeJsps/src/main/java/org/unicode/jsp/XPropertyFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static synchronized XPropertyFactory make() {
singleton = new XPropertyFactory();
return singleton;
}

public final Factory add2(UnicodeProperty sp) {
UnicodeProperty already = getProperty(sp.getName());
if (already== null) {
Expand All @@ -49,8 +49,8 @@ public final Factory add2(UnicodeProperty sp) {
return this;
}
}
{

{
ICUPropertyFactory base = ICUPropertyFactory.make();
for (String propertyAlias : (List<String>)base.getInternalAvailablePropertyAliases(new ArrayList())) {
add(base.getProperty(propertyAlias));
Expand Down Expand Up @@ -150,17 +150,17 @@ public String transform(Integer source) {
.setMain("Script_Extensions", "scx", UnicodeProperty.ENUMERATED, "1.1")
.addValueAliases(ScriptTester.getScriptSpecialsAlternates(), false)
);

CachedProps cp = CachedProps.CACHED_PROPS;
for (String prop : cp.getAvailable()) {
add2(cp.getProperty(prop));
}
UnicodeSet Basic_Emoji = cp.getProperty("Basic_Emoji").getTrueSet();
UnicodeSet Emoji_Keycap_Sequence = cp.getProperty("RGI_Emoji_Keycap_Sequence").getTrueSet();
UnicodeSet RGI_Emoji_Modifier_Sequence = cp.getProperty("RGI_Emoji_Modifier_Sequence").getTrueSet();
UnicodeSet RGI_Emoji_Tag_Sequence = cp.getProperty("RGI_Emoji_Tag_Sequence").getTrueSet();
UnicodeSet RGI_Emoji_Flag_Sequence = cp.getProperty("RGI_Emoji_Flag_Sequence").getTrueSet();
UnicodeSet RGI_Emoji_Zwj_Sequence = cp.getProperty("RGI_Emoji_Zwj_Sequence").getTrueSet();
UnicodeSet Basic_Emoji = cp.getProperty("Basic_Emoji").getSet("Yes", null); // TODO: was .getTrueSet();
UnicodeSet Emoji_Keycap_Sequence = cp.getProperty("RGI_Emoji_Keycap_Sequence").getSet("Yes", null); // TODO: was .getTrueSet();
UnicodeSet RGI_Emoji_Modifier_Sequence = cp.getProperty("RGI_Emoji_Modifier_Sequence").getSet("Yes", null); // TODO: was .getTrueSet();
UnicodeSet RGI_Emoji_Tag_Sequence = cp.getProperty("RGI_Emoji_Tag_Sequence").getSet("Yes", null); // TODO: was .getTrueSet();
UnicodeSet RGI_Emoji_Flag_Sequence = cp.getProperty("RGI_Emoji_Flag_Sequence").getSet("Yes", null); // TODO: was .getTrueSet();
UnicodeSet RGI_Emoji_Zwj_Sequence = cp.getProperty("RGI_Emoji_Zwj_Sequence").getSet("Yes", null); // TODO: was .getTrueSet();
UnicodeSet RGI_Emoji = new UnicodeSet()
.add(Basic_Emoji)
.add(Emoji_Keycap_Sequence)
Expand Down Expand Up @@ -264,7 +264,7 @@ private void addBytes(StringBuilder builder, int bytes) {
builder.append(' ');
}
first = false;
builder.append(hex);
builder.append(hex);
}
}

Expand Down

0 comments on commit f23eb0d

Please sign in to comment.