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

Mitth'raw'nuruodo updated WW-4831:
----------------------------------
    Description: 
The {{com.opensymphony.xwork2.conversion.impl.StringConverter}} class, since 
Struts 2.5.11, incorrectly handles arrays containing null; it converts them to 
arrays containing the string "null" (using {{String.valueOf}}).

This is breaking one of our applications; some pages are OK, but on other 
pages, every non-provided field is populated with the String "null".

This is a similar issue to WW-4737, but occurring in different code.

Please ensure that conversion to String always uses {{Objects.toString}}, which 
preserves nulls, rather than {{String.valueOf}}, which converts them to the 
four-letter string "null".

  was:
The {{org.apache.struts2.dispatcher.Parameter.Request}} class (added in Struts 
2.5.3) incorrectly handles arrays containing null; it converts them to arrays 
containing the string "null" (using {{String.valueOf}}).

This is breaking one of our applications; some pages are OK, but on other 
pages, every non-provided field is populated with "null".


> Array-of-null parameters are converted to arrays containing "null"
> ------------------------------------------------------------------
>
>                 Key: WW-4831
>                 URL: https://issues.apache.org/jira/browse/WW-4831
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5.5, 2.5.8
>            Reporter: Mitth'raw'nuruodo
>             Fix For: 2.5.12
>
>
> The {{com.opensymphony.xwork2.conversion.impl.StringConverter}} class, since 
> Struts 2.5.11, incorrectly handles arrays containing null; it converts them 
> to arrays containing the string "null" (using {{String.valueOf}}).
> This is breaking one of our applications; some pages are OK, but on other 
> pages, every non-provided field is populated with the String "null".
> This is a similar issue to WW-4737, but occurring in different code.
> Please ensure that conversion to String always uses {{Objects.toString}}, 
> which preserves nulls, rather than {{String.valueOf}}, which converts them to 
> the four-letter string "null".



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

Reply via email to