mirror of
https://github.com/apache/struts.git
synced 2026-08-07 07:37:20 +00:00
WW-2498 Minor change to avoid NPE when parseContent attribute is missing on dojo tags or in the context. Defaults to false if null.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@629326 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+2
-1
@@ -110,8 +110,9 @@ public abstract class AbstractRemoteBean extends ClosingUIBean implements Remote
|
||||
else
|
||||
addParameter("parseContent", true);
|
||||
|
||||
// generate a random ID if not explicitly set and not parsing the content
|
||||
Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
boolean generateId = (parseContent != null ? !parseContent : false);
|
||||
boolean generateId = (parseContent != null ? !parseContent : true);
|
||||
|
||||
addParameter("pushId", generateId);
|
||||
if ((this.id == null || this.id.length() == 0) && generateId) {
|
||||
|
||||
@@ -324,7 +324,10 @@ public class Autocompleter extends ComboBox {
|
||||
if (resultsLimit != null)
|
||||
addParameter("searchLimit", findString(resultsLimit));
|
||||
|
||||
boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
// generate a random ID if not explicitly set and not parsing the content
|
||||
Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
boolean generateId = (parseContent != null ? !parseContent : true);
|
||||
|
||||
addParameter("pushId", generateId);
|
||||
if ((this.id == null || this.id.length() == 0) && generateId) {
|
||||
// resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs
|
||||
|
||||
@@ -264,7 +264,10 @@ public class DateTimePicker extends UIBean {
|
||||
}
|
||||
}
|
||||
|
||||
boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
// generate a random ID if not explicitly set and not parsing the content
|
||||
Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
boolean generateId = (parseContent != null ? !parseContent : true);
|
||||
|
||||
addParameter("pushId", generateId);
|
||||
if ((this.id == null || this.id.length() == 0) && generateId) {
|
||||
// resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs
|
||||
|
||||
@@ -236,8 +236,11 @@ public class Submit extends FormButton implements RemoteBean {
|
||||
|
||||
if (ajaxAfterValidation != null)
|
||||
addParameter("ajaxAfterValidation", findValue(ajaxAfterValidation, Boolean.class));
|
||||
|
||||
boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
|
||||
// generate a random ID if not explicitly set and not parsing the content
|
||||
Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
boolean generateId = (parseContent != null ? !parseContent : true);
|
||||
|
||||
addParameter("pushId", generateId);
|
||||
if ((this.id == null || this.id.length() == 0) && generateId) {
|
||||
// resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs
|
||||
|
||||
@@ -128,7 +128,10 @@ public class TabbedPanel extends ClosingUIBean {
|
||||
addParameter("useSelectedTabCookie", findString(useSelectedTabCookie));
|
||||
}
|
||||
|
||||
boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
// generate a random ID if not explicitly set and not parsing the content
|
||||
Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
boolean generateId = (parseContent != null ? !parseContent : true);
|
||||
|
||||
addParameter("pushId", generateId);
|
||||
if ((this.id == null || this.id.length() == 0) && generateId) {
|
||||
// resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs
|
||||
|
||||
@@ -47,7 +47,10 @@ public class TextArea extends org.apache.struts2.components.TextArea {
|
||||
public void evaluateExtraParams() {
|
||||
super.evaluateExtraParams();
|
||||
|
||||
boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
// generate a random ID if not explicitly set and not parsing the content
|
||||
Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
boolean generateId = (parseContent != null ? !parseContent : true);
|
||||
|
||||
addParameter("pushId", generateId);
|
||||
if ((this.id == null || this.id.length() == 0) && generateId) {
|
||||
// resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs
|
||||
|
||||
@@ -253,8 +253,11 @@ public class Tree extends ClosingUIBean {
|
||||
addParameter("href", findString(href));
|
||||
if (errorNotifyTopics != null)
|
||||
addParameter("errorNotifyTopics", findString(errorNotifyTopics));
|
||||
|
||||
boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
|
||||
// generate a random ID if not explicitly set and not parsing the content
|
||||
Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
boolean generateId = (parseContent != null ? !parseContent : true);
|
||||
|
||||
addParameter("pushId", generateId);
|
||||
if ((this.id == null || this.id.length() == 0) && generateId) {
|
||||
// resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs
|
||||
|
||||
@@ -115,7 +115,10 @@ public class TreeNode extends ClosingUIBean {
|
||||
protected void evaluateExtraParams() {
|
||||
super.evaluateExtraParams();
|
||||
|
||||
boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
// generate a random ID if not explicitly set and not parsing the content
|
||||
Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
|
||||
boolean generateId = (parseContent != null ? !parseContent : true);
|
||||
|
||||
addParameter("pushId", generateId);
|
||||
if ((this.id == null || this.id.length() == 0) && generateId) {
|
||||
// resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs
|
||||
|
||||
Reference in New Issue
Block a user