You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Thomas Howard (JIRA)" <ji...@apache.org> on 2010/06/07 11:09:55 UTC
[jira] Created: (WW-3455) ServletRedirectResult ignoring
supressEmptyParameters option
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
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.
-
You can reply to this email to add a comment to the issue online.