struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4182) NullPointerException in DefaultUrlHelper
Date Fri, 18 Oct 2013 15:14:44 GMT

    [ https://issues.apache.org/jira/browse/WW-4182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13799176#comment-13799176
] 

Hudson commented on WW-4182:
----------------------------

SUCCESS: Integrated in Struts2-JDK6 #814 (See [https://builds.apache.org/job/Struts2-JDK6/814/])
WW-4182 Adds additional check to avoid NPE (lukaszlenart: rev 1533346)
* /struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/util/DefaultUrlHelper.java


> NullPointerException in DefaultUrlHelper
> ----------------------------------------
>
>                 Key: WW-4182
>                 URL: https://issues.apache.org/jira/browse/WW-4182
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.3.15.1
>            Reporter: Thomas Goettlich
>            Assignee: Lukasz Lenart
>             Fix For: 2.3.16
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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: 
> {code}
> link.append(buildParameterSubstring(name, paramValue.toString()));
> {code}
> For null parameters an empty string is written to the url:
> {code}
> value != null ? value.toString() : StringUtils.EMPTY
> {code}
> A fix would be to check ??paramValue?? for null as well, thus allowing arrays or iterables
to contain null elements.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message