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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

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

ASF GitHub Bot (Jira)

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

ASF GitHub Bot logged work on LANG-1484:

                Author: ASF GitHub Bot
            Created on: 13/Sep/19 07:10
            Start Date: 13/Sep/19 07:10
    Worklog Time Spent: 10m
      Work Description: nicolasbd 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-531125751
   @saksham93 ah sorry I didn't know about those, but looking at them I see this : `assertFalse( NumberUtils.isParsable("64.") );` for example
   I mean, maybe we should add some tests to ensure your modif is always okay, but I'm new to the project so it might not be necessary as you pointed out, maybe someone else will confirm
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:
[hidden email]

Issue Time Tracking

    Worklog Id:     (was: 311897)
    Time Spent: 50m  (was: 40m)

> 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: 50m
>  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