ICU-21116 Fix ListFormatterTest on Android

Android ignores assert statement by default.
The test also failed when running with ant and on OpenJDK runtime
on release-67-1. But no longer fails on master branch.
This commit is contained in:
Victor Chang 2021-01-12 11:59:13 +00:00 committed by Shane F. Carr
parent fc12cf095c
commit 3b1ec5032c

View file

@ -144,7 +144,8 @@ public class FormattedValueStringBuilderImpl {
int end = i - self.zero;
// Handle span fields; don't trim them
if (currField instanceof SpanFieldPlaceholder) {
assert handleSpan(currField, cfpos, fieldStart, end);
boolean handleResult = handleSpan(currField, cfpos, fieldStart, end);
assert handleResult;
return true;
}
// Grouping separators can be whitespace; don't throw them out!