You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/02/22 13:49:00 UTC

[jira] [Work logged] (LANG-1484) NumberUtils.isParsable returns false for strings ending with .

     [ https://issues.apache.org/jira/browse/LANG-1484?focusedWorklogId=391111&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-391111 ]

ASF GitHub Bot logged work on LANG-1484:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Feb/20 13:48
            Start Date: 22/Feb/20 13:48
    Worklog Time Spent: 10m 
      Work Description: garydgregory commented on issue #455: LANG-1484: Allow decimal point at the end of the String
URL: https://github.com/apache/commons-lang/pull/455#issuecomment-589957886
 
 
   Not a fan unless `testIsParsable` is updated to actually prove that something is parsable or not; for example, update:
   ```
           assertTrue( NumberUtils.isParsable("64") );
   ```
   to
   ```
           assertTrue( NumberUtils.isParsable("64") );
           Integer.parseInt("64");
   ```
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 391111)
    Time Spent: 1.5h  (was: 1h 20m)

> NumberUtils.isParsable returns false for strings ending with .
> --------------------------------------------------------------
>
>                 Key: LANG-1484
>                 URL: https://issues.apache.org/jira/browse/LANG-1484
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.math.*
>    Affects Versions: 3.8.1
>         Environment: Tested on Linux with OpenJDK 10.0.2 and Windows with Oracle Java 8 Update 201.
>            Reporter: Kyle Dodson
>            Priority: Minor
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> From the Javadocs:
> {quote}Parsable numbers include those Strings understood by ... Double.parseDouble(String).
> {quote}
> {{Double.parseDouble("100.")}} returns a valid double (it does not throw a {{NumberFormatException}}); however, {{NumberUtils.isParsable("100.")}} returns {{false}}.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)