if (mode == null) mode = ParseMode.LENIENT;
boolean integerOnly = properties.getParseIntegerOnly();
boolean ignoreExponent = properties.getParseNoExponent();
- boolean ignoreGrouping = properties.getGroupingSize() < 0;
+ boolean ignoreGrouping = properties.getGroupingSize() <= 0;
// Set up the initial state
ParserState state = threadLocalParseState.get().clear();
numGroupingRegions--;
}
}
- if (grouping1 < 0) {
+ if (grouping1 <= 0) {
// OK (no grouping data available)
} else if (numGroupingRegions <= 1) {
// OK (no grouping digits)
DecimalFormat df = new DecimalFormat();
df.setGroupingUsed(false);
assertEquals("Grouping size should now be zero", 0, df.getGroupingSize());
+ assertEquals("Grouping should be off", false, df.isGroupingUsed());
}
@Test