struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Howard (JIRA)" <>
Subject [jira] Created: (WW-3455) ServletRedirectResult ignoring supressEmptyParameters option
Date Mon, 07 Jun 2010 09:09:55 GMT
ServletRedirectResult ignoring supressEmptyParameters option

                 Key: WW-3455
             Project: Struts 2
          Issue Type: Bug
    Affects Versions:
            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

                                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(),
                        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.


This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message