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:
Musachy Barroso
2009-09-28 16:50:21 +00:00
parent bd48ea0521
commit 491af32e40
@@ -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())