struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (WW-3171) "double" and "Double" are not validated with the same decimal séparator
Date Tue, 16 May 2017 12:46:04 GMT


ASF GitHub Bot commented on WW-3171:

Github user lukaszlenart commented on the issue:
    `ParsePosition` is basically used to check if the whole value was used, e.g. `1234abc`
can be normally parsed into `1234` but comparing the `ParsePosition` with length of the value
you can catch such problems.
    Also please notice that I have to change just two old tests because of how `double` was
represented - I hope that this change is as less intrusive as possible :)
    @cnenning can you elaborate a bit more about parsing dates? I thought this is already

> "double" and "Double" are not validated with the same decimal séparator
> -----------------------------------------------------------------------
>                 Key: WW-3171
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.14
>         Environment: Windows or Linux - Running under Tomcat 6.0 - fr_FR
>            Reporter: françois-frédéric jean
>            Assignee: Lukasz Lenart
>            Priority: Critical
>             Fix For:
> I had this strange behaviour.
> I have two double in my Action (extends ActionSupport):
> ---------------------------
> private double dbl1;
> private Double dbl2;
> ---------------------------
> With there respective getters and setters.
> But, when I call the action with these two doubles (from a classical HTML form), I must
put a "dot" for the double, and a "comma" for the Double as a decimal separator, 
> I'm surprised by this behaviour .... Nothing particular was done (HTML form calling an
action). I can't imagine what is the reason of this behaviour, so I raise it as a bug.
> Regards
> Francillo

This message was sent by Atlassian JIRA

View raw message