You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/05/31 21:11:13 UTC
[tomcat] branch 7.0.x updated: Align 7.0.x with 8.5.x. No
functional change.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push:
new ff2f0b0 Align 7.0.x with 8.5.x. No functional change.
ff2f0b0 is described below
commit ff2f0b0c36c99a821e92fd828da1dab969dd5d13
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri May 31 22:06:24 2019 +0100
Align 7.0.x with 8.5.x. No functional change.
---
.../javax/servlet/jsp/tagext/SimpleTagSupport.java | 9 +++---
java/javax/servlet/jsp/tagext/TagAdapter.java | 2 +-
java/javax/servlet/jsp/tagext/TagInfo.java | 34 ++++++++++++++--------
java/javax/servlet/jsp/tagext/VariableInfo.java | 7 +++--
4 files changed, 31 insertions(+), 21 deletions(-)
diff --git a/java/javax/servlet/jsp/tagext/SimpleTagSupport.java b/java/javax/servlet/jsp/tagext/SimpleTagSupport.java
index 4cbadf7..496ba95 100644
--- a/java/javax/servlet/jsp/tagext/SimpleTagSupport.java
+++ b/java/javax/servlet/jsp/tagext/SimpleTagSupport.java
@@ -184,9 +184,8 @@ public class SimpleTagSupport implements SimpleTag {
{
boolean isInterface = false;
- if (from == null || klass == null
- || (!JspTag.class.isAssignableFrom(klass)
- && !(isInterface = klass.isInterface()))) {
+ if (from == null || klass == null || (!JspTag.class.isAssignableFrom(klass) &&
+ !(isInterface = klass.isInterface()))) {
return null;
}
@@ -206,8 +205,8 @@ public class SimpleTagSupport implements SimpleTag {
parent = ((TagAdapter) parent).getAdaptee();
}
- if ((isInterface && klass.isInstance(parent))
- || klass.isAssignableFrom(parent.getClass())) {
+ if ((isInterface && klass.isInstance(parent)) ||
+ klass.isAssignableFrom(parent.getClass())) {
return parent;
}
diff --git a/java/javax/servlet/jsp/tagext/TagAdapter.java b/java/javax/servlet/jsp/tagext/TagAdapter.java
index 1ae8bb8..aedc16d 100644
--- a/java/javax/servlet/jsp/tagext/TagAdapter.java
+++ b/java/javax/servlet/jsp/tagext/TagAdapter.java
@@ -34,7 +34,7 @@ import javax.servlet.jsp.PageContext;
*/
public class TagAdapter implements Tag {
/** The simple tag that's being adapted. */
- private SimpleTag simpleTagAdaptee;
+ private final SimpleTag simpleTagAdaptee;
/** The parent, of this tag, converted (if necessary) to be of type Tag. */
private Tag parent;
diff --git a/java/javax/servlet/jsp/tagext/TagInfo.java b/java/javax/servlet/jsp/tagext/TagInfo.java
index 8c8784e..6183cf7 100644
--- a/java/javax/servlet/jsp/tagext/TagInfo.java
+++ b/java/javax/servlet/jsp/tagext/TagInfo.java
@@ -90,6 +90,13 @@ public class TagInfo {
this.tagExtraInfo = tagExtraInfo;
this.attributeInfo = attributeInfo;
+ // Use defaults for unspecified values
+ this.displayName = null;
+ this.largeIcon = null;
+ this.smallIcon = null;
+ this.tagVariableInfo = null;
+ this.dynamicAttributes = false;
+
if (tagExtraInfo != null)
tagExtraInfo.setTagInfo(this);
}
@@ -141,6 +148,9 @@ public class TagInfo {
this.largeIcon = largeIcon;
this.tagVariableInfo = tvi;
+ // Use defaults for unspecified values
+ this.dynamicAttributes = false;
+
if (tagExtraInfo != null)
tagExtraInfo.setTagInfo(this);
}
@@ -424,24 +434,24 @@ public class TagInfo {
/*
* private fields for 1.1 info
*/
- private String tagName; // the name of the tag
- private String tagClassName;
- private String bodyContent;
- private String infoString;
- private TagLibraryInfo tagLibrary;
- private TagExtraInfo tagExtraInfo; // instance of TagExtraInfo
- private TagAttributeInfo[] attributeInfo;
+ private final String tagName; // the name of the tag
+ private final String tagClassName;
+ private final String bodyContent;
+ private final String infoString;
+ private TagLibraryInfo tagLibrary;
+ private TagExtraInfo tagExtraInfo; // instance of TagExtraInfo
+ private final TagAttributeInfo[] attributeInfo;
/*
* private fields for 1.2 info
*/
- private String displayName;
- private String smallIcon;
- private String largeIcon;
- private TagVariableInfo[] tagVariableInfo;
+ private final String displayName;
+ private final String smallIcon;
+ private final String largeIcon;
+ private final TagVariableInfo[] tagVariableInfo;
/*
* Additional private fields for 2.0 info
*/
- private boolean dynamicAttributes;
+ private final boolean dynamicAttributes;
}
diff --git a/java/javax/servlet/jsp/tagext/VariableInfo.java b/java/javax/servlet/jsp/tagext/VariableInfo.java
index d71032f..b7972f5 100644
--- a/java/javax/servlet/jsp/tagext/VariableInfo.java
+++ b/java/javax/servlet/jsp/tagext/VariableInfo.java
@@ -81,11 +81,12 @@ package javax.servlet.jsp.tagext;
* thus where synchronization is needed as illustrated by the table below.
* <b>Note:</b> the synchronization of the variable(s) will occur <em>after</em>
* the respective method has been called. <blockquote>
- * <table cellpadding="2" cellspacing="2" border="0" width="55%" style="background-color:#999999" summary="Variable Synchronization Points">
+ * <table cellpadding="2" cellspacing="2" border="0" width="55%"
+ * style="background-color:#999999" summary="Variable Synchronization Points">
* <tbody>
* <tr align="center">
- * <td valign="top" colspan="6" style="background-color:#999999"><u><b>Variable Synchronization
- * Points</b></u><br>
+ * <td valign="top" colspan="6" style="background-color:#999999">
+ * <u><b>Variable Synchronization Points</b></u><br>
* </td>
* </tr>
* <tr>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org