NumberUtils#withDecimalsParsing: Eliminate redundant calculation of isDecimalPoint. (closes #160)
This commit is contained in:
parent
c979d63934
commit
faeaa303b9
|
@ -1524,7 +1524,7 @@ public class NumberUtils {
|
||||||
int decimalPoints = 0;
|
int decimalPoints = 0;
|
||||||
for (int i = beginIdx; i < str.length(); i++) {
|
for (int i = beginIdx; i < str.length(); i++) {
|
||||||
final boolean isDecimalPoint = str.charAt(i) == '.';
|
final boolean isDecimalPoint = str.charAt(i) == '.';
|
||||||
if (str.charAt(i) == '.') {
|
if (isDecimalPoint) {
|
||||||
decimalPoints++;
|
decimalPoints++;
|
||||||
}
|
}
|
||||||
if (decimalPoints > 1) {
|
if (decimalPoints > 1) {
|
||||||
|
|
Loading…
Reference in New Issue