Author: pbenedict
Date: Sun Sep 24 22:51:37 2006
New Revision: 449579

URL: http://svn.apache.org/viewvc?view=rev&rev=449579
Log:
STR-746: Correctly clear internal property; minor consistency changes in 
subclassed tags.

Modified:
    
struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/FrameTag.java
    
struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/LinkTag.java
    
struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/RewriteTag.java

Modified: 
struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/FrameTag.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/FrameTag.java?view=diff&rev=449579&r1=449578&r2=449579
==============================================================================
--- 
struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/FrameTag.java
 (original)
+++ 
struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/FrameTag.java
 Sun Sep 24 22:51:37 2006
@@ -138,15 +138,6 @@
     // --------------------------------------------------------- Public Methods
 
     /**
-     * Evaluate the body for any parameters.
-     *
-     * @throws JspException if a JSP exception has occurred
-     */
-    public int doStartTag() throws JspException {
-        return (EVAL_BODY_TAG);
-    }
-
-    /**
      * Render the appropriately encoded URI.
      *
      * @throws JspException if a JSP exception has occurred

Modified: 
struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/LinkTag.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/LinkTag.java?view=diff&rev=449579&r1=449578&r2=449579
==============================================================================
--- 
struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/LinkTag.java
 (original)
+++ 
struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/LinkTag.java
 Sun Sep 24 22:51:37 2006
@@ -140,7 +140,7 @@
     /**
      * Additional parameters included programatically.
      */
-    protected Map parameters = null;
+    protected Map parameters = new HashMap();
 
     /**
      * Name of parameter to generate to hold index number
@@ -307,9 +307,10 @@
      * @throws JspException if a JSP exception has occurred
      */
     public int doStartTag() throws JspException {
-        // Evaluate the body of this tag
         this.text = null;
+        this.parameters.clear();
 
+        // Evaluate the body of this tag
         return (EVAL_BODY_TAG);
     }
 
@@ -413,7 +414,7 @@
                 transaction);
         
         // Add parameters collected from the tag's inner body
-        if (this.parameters != null) {
+        if (!this.parameters.isEmpty()) {
             if (params == null) {
                 params = new HashMap();
             }
@@ -460,9 +461,6 @@
      * @since Struts 1.3.6
      */
     public void addParameter(String paramName, Object paramValue) {
-        if (this.parameters == null) {
-            this.parameters = new HashMap();
-        }
         this.parameters.put(paramName, paramValue);
     }
 }

Modified: 
struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/RewriteTag.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/RewriteTag.java?view=diff&rev=449579&r1=449578&r2=449579
==============================================================================
--- 
struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/RewriteTag.java
 (original)
+++ 
struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/RewriteTag.java
 Sun Sep 24 22:51:37 2006
@@ -48,7 +48,7 @@
                 transaction);
 
         // Add parameters collected from the tag's inner body
-        if (this.parameters != null) {
+        if (!this.parameters.isEmpty()) {
             if (params == null) {
                 params = new HashMap();
             }


Reply via email to