mirror of
https://github.com/apache/struts.git
synced 2026-08-11 09:36:57 +00:00
prevent NPE when value is null
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@819639 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -36,6 +36,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
import org.apache.commons.lang.xwork.StringUtils;
|
||||
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.inject.Container;
|
||||
@@ -234,7 +235,7 @@ public class UrlHelper {
|
||||
link.append(paramSeparator);
|
||||
}
|
||||
} else {
|
||||
link.append(buildParameterSubstring(name, value.toString()));
|
||||
link.append(buildParameterSubstring(name, value != null ? value.toString() : StringUtils.EMPTY));
|
||||
}
|
||||
|
||||
if (iter.hasNext())
|
||||
|
||||
Reference in New Issue
Block a user