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

Lukasz Lenart updated WW-3455:
------------------------------

    Fix Version/s: 2.3.x
    
> ServletRedirectResult ignoring supressEmptyParameters option
> ------------------------------------------------------------
>
>                 Key: WW-3455
>                 URL: https://issues.apache.org/jira/browse/WW-3455
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.1.8.1
>            Reporter: Thomas Howard
>             Fix For: 2.3.x
>
>
> I've been attempting to use the supressEmptyParameters option on 
> ServletRedirectResult but it appears that this option is basically ignored in 
> the code.  
> Looking at the source it seems there's a line that adds the value to the 
> requestParameters map:
> requestParameters.put(e.getKey().toString(),
>                                 e.getValue() == null ? "" :
>                                         
> conditionalParse(e.getValue().toString(), invocation));
> Which is then followed by the check of the empty parameters, which then 
> attempts to add the value again:
> String potentialValue = e.getValue() == null ? "" : 
> conditionalParse(e.getValue().toString(), invocation);
>                         if (!supressEmptyParameters || ((potentialValue != 
> null) && (potentialValue.length() > 0))) {
>                             requestParameters.put(e.getKey().toString(), 
> potentialValue);
>                         }
> I'm guessing that the first line was either left in by mistake, or maybe got 
> merged back into place by mistake, but basically needs to be removed.
> Thanks

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to