You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Jira)" <ji...@apache.org> on 2023/06/28 07:00:00 UTC

[jira] [Updated] (WW-3666) TypeConverter should trim before conversion to things that are not Strings

     [ https://issues.apache.org/jira/browse/WW-3666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart updated WW-3666:
------------------------------
    Fix Version/s: 6.4.0
                       (was: 6.2.0)

> TypeConverter should trim before conversion to things that are not Strings
> --------------------------------------------------------------------------
>
>                 Key: WW-3666
>                 URL: https://issues.apache.org/jira/browse/WW-3666
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Value Stack
>    Affects Versions: 2.2.1.1
>         Environment: Standard Struts2 implementation with Jetty
>            Reporter: adam brin
>            Priority: Minor
>             Fix For: 6.4.0
>
>
> For a simple struts2 application, when you pass in parameters that are not "Strings" for example Longs or Enums the Xwork2 TypeConverter (and Struts2's handling) needs some work.
> Issues:
> * numeric values are not properly parsed if they have space characters
> * enum values are not properly parsed if they have space characters
> * ideally some exception would bubble back up in the form of an ActionError
> Attached (in comments) is a simple controller and test case using HTMLUnit to demonstrate the issue.  Even with the following logger settings, no errors are visible:
> {noformat}log4j.logger.org.apache.struts2=TRACE
> log4j.logger.com.opensymphony.xwork2=TRACE
> {noformat} 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)