struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Goettlich (JIRA)" <>
Subject [jira] [Created] (WW-4182) NullpointerException in DefaultUrlHelper
Date Wed, 21 Aug 2013 09:06:51 GMT
Thomas Goettlich created WW-4182:

             Summary: NullpointerException in DefaultUrlHelper
                 Key: WW-4182
             Project: Struts 2
          Issue Type: Bug
          Components: Core Actions
    Affects Versions:
            Reporter: Thomas Goettlich

In the method ??DefaultUrlHelper.buildParametersString(...)?? a NullPointerException occurs
whenever an array or iterable parameter containing null elements is passed.

The problem seems to be lines 214 and 244, which look the same: 
link.append(buildParameterSubstring(name, paramValue.toString()));

For null parameters an empty string is written to the url:
value != null ? value.toString() : StringUtils.EMPTY

A fix would be to check ??paramValue?? for null as well, thus allowing arrays or iterables
to contain null elements.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message