elharo commented on code in PR #1071:
URL: https://github.com/apache/commons-lang/pull/1071#discussion_r1278287785


##########
src/main/java/org/apache/commons/lang3/math/NumberUtils.java:
##########
@@ -1776,7 +1773,7 @@ private static boolean withDecimalsParsing(final String 
str, final int beginIdx)
             if (decimalPoints > 1) {
                 return false;
             }
-            if (!isDecimalPoint && !Character.isDigit(str.charAt(i))) {
+            if (!isDecimalPoint && !Character.isDigit(str.charAt(i)) && !(i == 
str.length() - 1 && str.charAt(i) == '.')) {

Review Comment:
   Per current Javadoc "Parsable numbers include those Strings understood by 
Integer#parseInt(String), Long#parseLong(String), Float#parseFloat(String)} or 
Double#parseDouble(String)."
   
   If those methods don't worry about countries that flip the meaning of the 
comma and period, we shouldn't do it here. That would be a breaking behavior 
change.
   
   As to another method that uses Locales, that's in java.util so outside the 
advertised scope for commons-lang. 
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to