From: Yoshito Umaoka Date: Thu, 30 Aug 2012 21:11:12 +0000 (+0000) Subject: ICU-9521 Quick patch for IntlTestNumberFormat/TestMonster exhaustive test failure. X-Git-Tag: milestone-59-0-1~3599 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=720f588b90b2b4f8ff8521cfdffafef0e54e0e4d;p=icu ICU-9521 Quick patch for IntlTestNumberFormat/TestMonster exhaustive test failure. X-SVN-Rev: 32304 --- diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java index ba398a83c50..2282196747e 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java @@ -1851,9 +1851,9 @@ public class DecimalFormat extends NumberFormat { tmpPos = new ParsePosition(origPos); tmpDigitList = new DigitList(); int savedCurrencySignCount = currencySignCount; - // set currencySignCount to 0 so that compareAffix function will fall to + // set currencySignCount to -1 so that compareAffix function will fall to // compareSimpleAffix path, not compareComplexAffix path. - currencySignCount = 0; + currencySignCount = -1; boolean result = subparse(text, tmpPos, tmpDigitList, tmpStatus, currency, negativePrefix, negativeSuffix, positivePrefix, positiveSuffix, Currency.SYMBOL_NAME); @@ -2123,8 +2123,8 @@ public class DecimalFormat extends NumberFormat { digits.decimalAt = digits.count = 0; char [] digitSymbols = symbols.getDigitsLocal(); - char decimal = currencySignCount > 0 ? symbols.getMonetaryDecimalSeparator() : symbols - .getDecimalSeparator(); + char decimal = currencySignCount == 0 ? symbols.getDecimalSeparator() + : symbols.getMonetaryDecimalSeparator(); char grouping = symbols.getGroupingSeparator(); String exponentSep = symbols.getExponentSeparator();