NumberUtils#withDecimalsParsing: Eliminate redundant calculation of isDecimalPoint. (closes #160)

This commit is contained in:
Eric Wannemacher 2016-06-03 10:51:47 -04:00 committed by pascalschumacher
parent c979d63934
commit faeaa303b9
1 changed files with 1 additions and 1 deletions

View File

@ -1524,7 +1524,7 @@ public class NumberUtils {
int decimalPoints = 0;
for (int i = beginIdx; i < str.length(); i++) {
final boolean isDecimalPoint = str.charAt(i) == '.';
if (str.charAt(i) == '.') {
if (isDecimalPoint) {
decimalPoints++;
}
if (decimalPoints > 1) {