ICU-6648 Resolved Eclipse IDE warnings introduced by the previous changes.

X-SVN-Rev: 25915
This commit is contained in:
Yoshito Umaoka 2009-04-25 19:53:05 +00:00
parent bfb6fdfefd
commit c6f152fb59
2 changed files with 5 additions and 5 deletions

View File

@ -389,6 +389,7 @@ public class IntlTestDecimalFormatAPI extends com.ibm.icu.dev.test.TestFmwk
numstr = df.format(5);
try {
Number n = df.parse(numstr);
logln("INFO: Parsed " + numstr + " -> " + n);
} catch (ParseException pe) {
errln("ERROR: Failed round trip with strict parsing.");
}
@ -398,8 +399,10 @@ public class IntlTestDecimalFormatAPI extends com.ibm.icu.dev.test.TestFmwk
numstr = "005";
try {
Number n = df.parse(numstr);
errln("ERROR: Expected round trip failure not encountered");
} catch (ParseException pe) { }
errln("ERROR: Expected round trip failure not encountered: numstr -> " + n);
} catch (ParseException pe) {
logln("INFO: Expected ParseExpection for " + numstr + " with strick parse enabled");
}
}
}

View File

@ -2296,7 +2296,6 @@ public class DecimalFormat extends NumberFormat {
// strict parsing
boolean strictParse = isParseStrict();
boolean strictFail = false; // did we exit with a strict parse failure?
boolean leadingZero = false; // did we see a leading zero?
int lastGroup = -1; // where did we last see a grouping separator?
int gs2 = groupingSize2 == 0 ? groupingSize : groupingSize2;
@ -2368,7 +2367,6 @@ public class DecimalFormat extends NumberFormat {
if (strictParse && !isExponent) {
// Allow leading zeros in exponents
// Count leading zeros for checking later
leadingZero = true;
if (!strictLeadingZero) leadingZeroPos = position + 1;
strictLeadingZero = true;
++leadingZeroCount;
@ -2422,7 +2420,6 @@ public class DecimalFormat extends NumberFormat {
if (isParseIntegerOnly() || sawDecimal) break;
digits.decimalAt = digitCount; // Not digits.count!
sawDecimal = true;
leadingZero = false; // a single leading zero before a decimal is ok
// Once we see a decimal character, we only accept that decimal character from then on.
decimalSet.set(ch,ch);