[jira] [Comment Edited] (WW-4837) StringConverter adds a decimal place to integers

2017-08-08 Thread Mitth'raw'nuruodo (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16119156#comment-16119156
 ] 

Mitth'raw'nuruodo edited comment on WW-4837 at 8/8/17 10:58 PM:


So...I'm OK to simply close this, but I'll note that it may be an issue 
(potentially breaking change) for anyone else using Struts with Freemarker 
numeric literals. Might be worth noting on the changelog somewhere?


was (Author: thrawnca):
So...I'm OK to simply close this, but I'll note that it may be an issue for 
anyone else using Struts with Freemarker numeric literals. Might be worth 
noting on the changelog somewhere?

> StringConverter adds a decimal place to integers
> 
>
> Key: WW-4837
> URL: https://issues.apache.org/jira/browse/WW-4837
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.12
>Reporter: Mitth'raw'nuruodo
> Fix For: 2.5.13
>
> Attachments: 2017-08-08_1045.png
>
>
> Commit 229afea64e77c2dba9eec62b2c339e9fc92c9ec7 caused all inputs 
> recognisable as numbers to be formatted with at least one decimal place. This 
> includes all integers, which is frequently undesirable, particularly if they 
> were meant to be, eg:
> - identifiers, not for arithmetic;
> - strictly validated against an XML schema that does not allow for 
> floating-point numbers;
> - subject to length limitations;
> - etc
> This apparently occurs because all inputs that look like numbers, regardless 
> of format, are of type {{BigDecimal}} by the time they reach the 
> {{StringConverter}}.
> For our applications, this is a blocker; is it working differently for 
> others? We don't have any special handling of input types.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (WW-4837) StringConverter adds a decimal place to integers

2017-08-07 Thread Mitth'raw'nuruodo (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16117439#comment-16117439
 ] 

Mitth'raw'nuruodo edited comment on WW-4837 at 8/7/17 10:29 PM:


No, we don't specify the type.
{code}
<@s.textfield theme="forces"
name="gst"
value=35
label="GST"
size=6
id="gst"
/>
{code}

I've taken a look at Freemarker documentation, but didn't find anything to help 
sort this out (It's possible that Freemarker is converting all literal numbers 
to BigDecimal, which would be an unfortunate combination with WW-3171, but 
understandable). Anyway, we didn't really need our attributes to be treated as 
any sort of number, so quoting them is working fine.


was (Author: thrawnca):
No, we don't specify the type.
{code}
<@s.textfield theme="forces"
name="gst"
value=35
label="GST"
size=6
id="gst"
/>
{code}

> StringConverter adds a decimal place to integers
> 
>
> Key: WW-4837
> URL: https://issues.apache.org/jira/browse/WW-4837
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.12
>Reporter: Mitth'raw'nuruodo
> Fix For: 2.5.13
>
>
> Commit 229afea64e77c2dba9eec62b2c339e9fc92c9ec7 caused all inputs 
> recognisable as numbers to be formatted with at least one decimal place. This 
> includes all integers, which is frequently undesirable, particularly if they 
> were meant to be, eg:
> - identifiers, not for arithmetic;
> - strictly validated against an XML schema that does not allow for 
> floating-point numbers;
> - subject to length limitations;
> - etc
> This apparently occurs because all inputs that look like numbers, regardless 
> of format, are of type {{BigDecimal}} by the time they reach the 
> {{StringConverter}}.
> For our applications, this is a blocker; is it working differently for 
> others? We don't have any special handling of input types.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (WW-4837) StringConverter adds a decimal place to integers

2017-08-06 Thread Mitth'raw'nuruodo (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115977#comment-16115977
 ] 

Mitth'raw'nuruodo edited comment on WW-4837 at 8/7/17 12:45 AM:


Hmm...not sure how much work it would take to make a demo app, but my initial 
finding is that this seems to be stemming from the {{s.textfield}} Freemarker 
tag. If we specify a numeric {{value}} without quotes, it gets a decimal place. 
Would have to look more into it, but I'm guessing that all numeric-looking 
values get turned into {{BigDecimal}} s.


was (Author: thrawnca):
Hmm...not sure how much work it would take to make a demo app, but my initial 
finding is that this seems to be stemming from the {{s.textfield}} Freemarker 
tag. If we specify a numeric {{value}} without quotes, it gets a decimal place. 
Would have to look more into it, but I'm guessing that all numeric-looking 
values get turned into {{BigDecimal}}s.

> StringConverter adds a decimal place to integers
> 
>
> Key: WW-4837
> URL: https://issues.apache.org/jira/browse/WW-4837
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.12
>Reporter: Mitth'raw'nuruodo
> Fix For: 2.5.13
>
>
> Commit 229afea64e77c2dba9eec62b2c339e9fc92c9ec7 caused all inputs 
> recognisable as numbers to be formatted with at least one decimal place. This 
> includes all integers, which is frequently undesirable, particularly if they 
> were meant to be, eg:
> - identifiers, not for arithmetic;
> - strictly validated against an XML schema that does not allow for 
> floating-point numbers;
> - subject to length limitations;
> - etc
> This apparently occurs because all inputs that look like numbers, regardless 
> of format, are of type {{BigDecimal}} by the time they reach the 
> {{StringConverter}}.
> For our applications, this is a blocker; is it working differently for 
> others? We don't have any special handling of input types.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (WW-4837) StringConverter adds a decimal place to integers

2017-08-04 Thread Mitth'raw'nuruodo (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113995#comment-16113995
 ] 

Mitth'raw'nuruodo edited comment on WW-4837 at 8/4/17 6:09 AM:
---

I know that the {{StringConverter}} class doesn't treat Integers as 
floating-point, but all our numeric-looking inputs are being turned into 
BigDecimal by the time they arrive there. I don't know which part of the Struts 
internals chooses that; we aren't declaring any parameters to be of type 
BigDecimal. Actually, I can see a bunch of affected parameters that are 
declared to be of type String in the relevant Action class, and we'd be quite 
happy for them to be just treated as String, but they're BigDecimal when 
they're passed to StringConverter. Any insights on why?


was (Author: thrawnca):
I know that the {{StringConverter}} class doesn't treat Integers as 
floating-point, but all our numeric-looking inputs are being turned into 
BigDecimal by the time they arrive there. I don't know which part of the Struts 
internals chooses that; we aren't declaring any parameters to be of type 
BigDecimal. Actually, I can see a bunch of affected parameters that are of type 
String, and we'd be quite happy for them to be just treated as String, but 
they're BigDecimal when they're passed to StringConverter..

> StringConverter adds a decimal place to integers
> 
>
> Key: WW-4837
> URL: https://issues.apache.org/jira/browse/WW-4837
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.12
>Reporter: Mitth'raw'nuruodo
> Fix For: 2.5.13
>
>
> Commit 229afea64e77c2dba9eec62b2c339e9fc92c9ec7 caused all inputs 
> recognisable as numbers to be formatted with at least one decimal place. This 
> includes all integers, which is frequently undesirable, particularly if they 
> were meant to be, eg:
> - identifiers, not for arithmetic;
> - strictly validated against an XML schema that does not allow for 
> floating-point numbers;
> - subject to length limitations;
> - etc
> This apparently occurs because all inputs that look like numbers, regardless 
> of format, are of type {{BigDecimal}} by the time they reach the 
> {{StringConverter}}.
> For our applications, this is a blocker; is it working differently for 
> others? We don't have any special handling of input types.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)