mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-15 17:56:54 +00:00
ICU-13461 Fixing coverity defects in new number parsing code.
X-SVN-Rev: 40834
This commit is contained in:
parent
bfab81c260
commit
bf49bd2afc
2 changed files with 2 additions and 6 deletions
|
@ -304,6 +304,7 @@ public class DecimalMatcher implements NumberParseMatcher {
|
|||
}
|
||||
|
||||
if (isScientific && segment.getOffset() != initialOffset) {
|
||||
assert result.quantity != null; // scientific notation always comes after the number
|
||||
boolean overflow = (exponent == Integer.MAX_VALUE);
|
||||
if (!overflow) {
|
||||
try {
|
||||
|
|
|
@ -9,7 +9,6 @@ import java.util.Comparator;
|
|||
import java.util.List;
|
||||
|
||||
import com.ibm.icu.impl.number.AffixPatternProvider;
|
||||
import com.ibm.icu.impl.number.AffixUtils;
|
||||
import com.ibm.icu.impl.number.CustomSymbolCurrency;
|
||||
import com.ibm.icu.impl.number.DecimalFormatProperties;
|
||||
import com.ibm.icu.impl.number.PatternStringParser;
|
||||
|
@ -225,11 +224,7 @@ public class NumberParserImpl {
|
|||
///////////////////////////////
|
||||
|
||||
if (!isStrict) {
|
||||
if (!isStrict
|
||||
|| patternInfo.containsSymbolType(AffixUtils.TYPE_PLUS_SIGN)
|
||||
|| properties.getSignAlwaysShown()) {
|
||||
parser.addMatcher(PlusSignMatcher.getInstance(symbols, false));
|
||||
}
|
||||
parser.addMatcher(PlusSignMatcher.getInstance(symbols, false));
|
||||
parser.addMatcher(MinusSignMatcher.getInstance(symbols, false));
|
||||
parser.addMatcher(NanMatcher.getInstance(symbols, parseFlags));
|
||||
parser.addMatcher(PercentMatcher.getInstance(symbols));
|
||||
|
|
Loading…
Add table
Reference in a new issue