Skip to content

Commit 43d5446

Browse files
committed
A null check and a comment
1 parent 0839ff3 commit 43d5446

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

unicodetools/src/main/java/org/unicode/props/PropertyParsingInfo.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,9 @@ static void parseSourceFile(
690690
&& indexUnicodeProperties.ucdVersion.compareTo(
691691
VersionInfo.UNICODE_6_3)
692692
<= 0) {
693+
// Old versions of MathClassEx had a malformed range and a line that
694+
// should have been commented out. Search for those specifically and
695+
// fix them; we don’t want to generally allow a new range syntax.
693696
parser =
694697
parser.withLinePreprocessor(
695698
s ->

unicodetools/src/main/java/org/unicode/props/PropertyUtilities.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ public RedundancyIgnoringMultivaluedJoiner() {}
7373

7474
@Override
7575
public String merge(String first, String second) {
76+
if (first == null) {
77+
return second;
78+
}
7679
final Set<String> oldValues = Set.of(first.split("\\|"));
7780
if (second == null || oldValues.contains(second)) {
7881
return first;

0 commit comments

Comments
 (0)