Skip to content

Commit

Permalink
minor performance tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
jdereg committed Apr 17, 2024
1 parent c8bf5f2 commit cb14296
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/cedarsoftware/util/MathUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,9 @@ public static Number parseToMinimalNumericType(String numStr) {
boolean hasExponent = false;
int mantissaSize = 0;
StringBuilder exponentValue = new StringBuilder();
int len = numStr.length();

for (int i = 0; i < numStr.length(); i++) {
for (int i = 0; i < len; i++) {
char c = numStr.charAt(i);
if (c == '.') {
hasDecimalPoint = true;
Expand Down

0 comments on commit cb14296

Please sign in to comment.