Skip to content

Commit d8a016d

Browse files
committed
ICU4J: handle trailing whitespace after a .match
1 parent af96c7a commit d8a016d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Diff for: icu4j/main/core/src/main/java/com/ibm/icu/message2/MFParser.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,8 @@ private MFDataModel.Variant getVariant() throws MFParseException {
650650
}
651651
keys.add(key);
652652
}
653-
// Only want to skip whitespace if we parsed at least one key
654-
if (!keys.isEmpty()) {
655-
skipOptionalWhitespaces();
656-
}
653+
// Trailing whitespace is allowed after the message
654+
skipOptionalWhitespaces();
657655
if (input.atEnd()) {
658656
checkCondition(
659657
keys.isEmpty(), "After selector keys it is mandatory to have a pattern.");

0 commit comments

Comments
 (0)