[ 
https://issues.apache.org/jira/browse/LANG-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15481651#comment-15481651
 ] 

ASF GitHub Bot commented on LANG-1252:
--------------------------------------

Github user britter commented on a diff in the pull request:

    https://github.com/apache/commons-lang/pull/186#discussion_r78293587
  
    --- Diff: src/main/java/org/apache/commons/lang3/math/NumberUtils.java ---
    @@ -1374,8 +1407,11 @@ public static boolean isNumber(final String str) {
             boolean hasDecPoint = false;
             boolean allowSigns = false;
             boolean foundDigit = false;
    +        boolean isJava6 = StringUtils.startsWith(
    +                System.getProperty("java.version"), "1.6");
    --- End diff --
    
    You can better use `SystemUtils`for this. But I'm about to extend 
`JavaVersion` in for 
[LANG-1263](https://issues.apache.org/jira/browse/LANG-1263) so that will make 
this even easier. I'll ping you when I have that finished.


> NumberUtils.isNumber and NumberUtils.createNumber resolve inconsistently
> ------------------------------------------------------------------------
>
>                 Key: LANG-1252
>                 URL: https://issues.apache.org/jira/browse/LANG-1252
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.math.*
>    Affects Versions: 3.4
>            Reporter: Rob Tompkins
>            Assignee: Rob Tompkins
>             Fix For: Discussion
>
>
> In considering the issues LANG-1060, LANG-1040, LANG-1038, and LANG-992, it 
> seems that there are times when {{NumberUtils.isNumber}} resolves to 
> {{false}} while {{NumberUtils.createNumber}}, given the same input, does not 
> throw an exception, returning a valid {{java.lang.Number}}. This 
> inconsistency should be resolved either by making {{isNumber}} more lenient 
> or {{createNumber}} more stringent.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to