Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 50BA511543 for ; Fri, 11 Apr 2014 10:30:27 +0000 (UTC) Received: (qmail 98596 invoked by uid 500); 11 Apr 2014 10:30:25 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 97358 invoked by uid 500); 11 Apr 2014 10:30:21 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 96894 invoked by uid 99); 11 Apr 2014 10:30:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Apr 2014 10:30:17 +0000 Date: Fri, 11 Apr 2014 10:30:17 +0000 (UTC) From: "Lukasz Lenart (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: =?utf-8?Q?[jira]_[Comment_Edited]_(WW-3171)_"double"_and_"Doub?= =?utf-8?Q?le"_are_not_validated_with_the_same_decimal_s=C3=A9parator?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WW-3171?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1282453= 0#comment-12824530 ]=20 Lukasz Lenart edited comment on WW-3171 at 4/11/14 10:30 AM: ------------------------------------------------------------- Using the incorrect decimal separator with a Double value doesn't raise a v= alidation error, instead it incorporates the fractional part of the number = to the integral part of the number. For example, writing 10.0 will became 100 instead of raising the validatio= n error "Invalid field value for field" as it does with double values. action: {code:java} private Double doble=3D10.0; public Double getDoble(){ return doble; } public void setDoble(Double doble){ this.doble =3D doble; } {code} jsp: {code:html} {code} If the action is called from the jsp and return to the jsp the value of dob= le multiplies * 10 in each call. This happens with Struts 2.1.8, Glashfish v2.1 and Linux with the spanish l= anguage. was (Author: nether): Using the incorrect decimal separator with a Double value doesn't raise a v= alidation error, instead it incorporates the fractional part of the number = to the integral part of the number. For example, writing 10.0 will became 100 instead of raising the validatio= n error "Invalid field value for field" as it does with double values. action: private Double doble=3D10.0; public Double getDoble(){ return doble; } public void setDoble(Double doble){ this.doble =3D doble; } jsp: If the action is called from the jsp and return to the jsp the value of dob= le multiplies * 10 in each call. This happens with Struts 2.1.8, Glashfish v2.1 and Linux with the spanish l= anguage. > "double" and "Double" are not validated with the same decimal s=C3=A9para= tor > ----------------------------------------------------------------------- > > Key: WW-3171 > URL: https://issues.apache.org/jira/browse/WW-3171 > 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=C3=A7ois-fr=C3=A9d=C3=A9ric jean > Assignee: Lukasz Lenart > Priority: Critical > Fix For: 2.3.18 > > > 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,=20 > I'm surprised by this behaviour .... Nothing particular was done (HTML fo= rm 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 (v6.2#6252)