Fix NPE when PARSE_CONTENT parameter not in context

WW-2398


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@628302 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald J. Brown
2008-02-16 14:12:14 +00:00
parent 588dfb56f7
commit 7bf30eacb3
@@ -109,8 +109,10 @@ public abstract class AbstractRemoteBean extends ClosingUIBean implements Remote
addParameter("parseContent", findValue(parseContent, Boolean.class));
else
addParameter("parseContent", true);
Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
boolean generateId = (parseContent != null ? !parseContent : false);
boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT);
addParameter("pushId", generateId);
if ((this.id == null || this.id.length() == 0) && generateId) {
// resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs