]> granicus.if.org Git - icu/commitdiff
ICU-9521 Quick patch for IntlTestNumberFormat/TestMonster exhaustive test failure.
authorYoshito Umaoka <y.umaoka@gmail.com>
Thu, 30 Aug 2012 21:11:12 +0000 (21:11 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Thu, 30 Aug 2012 21:11:12 +0000 (21:11 +0000)
X-SVN-Rev: 32304

icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java

index ba398a83c50c5c23429624102b55a9cfc881601e..2282196747e916e8f9a682c1652bd23d87139c51 100644 (file)
@@ -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();