tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r1037282 [1/2] - in /tomcat/taglibs/standard/trunk/spec: ./ src/main/java/javax/servlet/jsp/jstl/core/ src/main/java/javax/servlet/jsp/jstl/fmt/ src/main/java/javax/servlet/jsp/jstl/sql/ src/main/java/javax/servlet/jsp/jstl/tlv/
Date Sat, 20 Nov 2010 18:03:49 GMT
Author: jboynes
Date: Sat Nov 20 18:03:48 2010
New Revision: 1037282

URL: http://svn.apache.org/viewvc?rev=1037282&view=rev
Log:
reformat to clean up tabs

Modified:
    tomcat/taglibs/standard/trunk/spec/pom.xml
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/ConditionalTagSupport.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/Config.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IndexedValueExpression.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IteratedExpression.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IteratedValueExpression.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTag.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTagStatus.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTagSupport.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/fmt/JakartaInline.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/fmt/LocaleSupport.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/fmt/LocalizationContext.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/sql/Result.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/sql/ResultImpl.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/sql/ResultSupport.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/sql/SQLExecutionTag.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/tlv/PermittedTaglibsTLV.java
    tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/tlv/ScriptFreeTLV.java

Modified: tomcat/taglibs/standard/trunk/spec/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/spec/pom.xml?rev=1037282&r1=1037281&r2=1037282&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/spec/pom.xml (original)
+++ tomcat/taglibs/standard/trunk/spec/pom.xml Sat Nov 20 18:03:48 2010
@@ -16,91 +16,121 @@
    limitations under the License.
 -->
 <project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.taglibs</groupId>
-    <artifactId>taglibs-parent</artifactId>
-    <version>1-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>taglibs-standard-spec</artifactId>
-  <version>1.2-SNAPSHOT</version>
-  <packaging>bundle</packaging>
-
-  <name>Apache Standard Taglib - JSTL Specification API</name>
-
-  <inceptionYear>2001</inceptionYear>
-  <description>
-    An implementation of the JSP Standard Tag Library (JSTL) Specification API.
-  </description>
-
-  <url>http://tomcat.apache.org/taglibs/standard/</url>
-
-  <scm>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/spec</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/spec</developerConnection>
-    <url>http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/spec</url>
-  </scm>
-
-  <developers>
-    <developer><name>Pierre Delisle</name></developer>
-    <developer><name>Shawn Bayern</name></developer>
-    <developer><name>Nathan Abramson</name></developer>
-    <developer><name>Hans Bergsten</name></developer>
-    <developer><name>Scott Hasse</name></developer>
-    <developer><name>Justyna Horwat</name></developer>
-    <developer><name>Mark Kolb</name></developer>
-    <developer><name>Jan Luehe</name></developer>
-    <developer><name>Glenn Nielsen</name></developer>
-    <developer><name>Dmitri Plotnikov</name></developer>
-    <developer><name>Felipe Leme</name></developer>
-    <developer><name>Henri Yandell</name></developer>
-    <developer><name>Bjorn Townsend</name></developer>
-  </developers>
-
-  <contributors>
-    <contributor><name>Robert Goff</name></contributor>
-  </contributors>
-
-  <dependencies>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <version>2.5</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet.jsp</groupId>
-      <artifactId>jsp-api</artifactId>
-      <version>2.1</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>javax.el</groupId>
-      <artifactId>el-api</artifactId>
-      <version>1.0</version>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies> 
-  
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <configuration>
-          <instructions>
-            <Bundle-SymbolicName>${groupId}.${artifactId};singleton=true</Bundle-SymbolicName>
-            <Specification-Title>JSR-052 JavaServer Pages Standard Tag Library Specification</Specification-Title>
-            <Specification-Vendor>Sun Microsystems, Inc.</Specification-Vendor>
-            <Specification-Version>1.2</Specification-Version>
-            <Export-Package>javax.servlet.jsp.jstl*;version=1.2</Export-Package>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
+        xmlns="http://maven.apache.org/POM/4.0.0"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.taglibs</groupId>
+        <artifactId>taglibs-parent</artifactId>
+        <version>1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>taglibs-standard-spec</artifactId>
+    <version>1.2-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>Apache Standard Taglib - JSTL Specification API</name>
+
+    <inceptionYear>2001</inceptionYear>
+    <description>
+        An implementation of the JSP Standard Tag Library (JSTL) Specification API.
+    </description>
+
+    <url>http://tomcat.apache.org/taglibs/standard/</url>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/spec</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/spec
+        </developerConnection>
+        <url>http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/spec</url>
+    </scm>
+
+    <developers>
+        <developer>
+            <name>Pierre Delisle</name>
+        </developer>
+        <developer>
+            <name>Shawn Bayern</name>
+        </developer>
+        <developer>
+            <name>Nathan Abramson</name>
+        </developer>
+        <developer>
+            <name>Hans Bergsten</name>
+        </developer>
+        <developer>
+            <name>Scott Hasse</name>
+        </developer>
+        <developer>
+            <name>Justyna Horwat</name>
+        </developer>
+        <developer>
+            <name>Mark Kolb</name>
+        </developer>
+        <developer>
+            <name>Jan Luehe</name>
+        </developer>
+        <developer>
+            <name>Glenn Nielsen</name>
+        </developer>
+        <developer>
+            <name>Dmitri Plotnikov</name>
+        </developer>
+        <developer>
+            <name>Felipe Leme</name>
+        </developer>
+        <developer>
+            <name>Henri Yandell</name>
+        </developer>
+        <developer>
+            <name>Bjorn Townsend</name>
+        </developer>
+    </developers>
+
+    <contributors>
+        <contributor>
+            <name>Robert Goff</name>
+        </contributor>
+    </contributors>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet.jsp</groupId>
+            <artifactId>jsp-api</artifactId>
+            <version>2.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.el</groupId>
+            <artifactId>el-api</artifactId>
+            <version>1.0</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${groupId}.${artifactId};singleton=true</Bundle-SymbolicName>
+                        <Specification-Title>JSR-052 JavaServer Pages Standard Tag Library Specification
+                        </Specification-Title>
+                        <Specification-Vendor>Sun Microsystems, Inc.</Specification-Vendor>
+                        <Specification-Version>1.2</Specification-Version>
+                        <Export-Package>javax.servlet.jsp.jstl*;version=1.2</Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>

Modified: tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/ConditionalTagSupport.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/ConditionalTagSupport.java?rev=1037282&r1=1037281&r2=1037282&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/ConditionalTagSupport.java (original)
+++ tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/ConditionalTagSupport.java Sat Nov 20 18:03:48 2010
@@ -13,7 +13,7 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */ 
+ */
 
 package javax.servlet.jsp.jstl.core;
 
@@ -23,37 +23,36 @@ import javax.servlet.jsp.PageContext;
 import javax.servlet.jsp.tagext.TagSupport;
 
 /**
- * <p>Abstract class that facilitates implementation of conditional actions 
- * where the boolean result is exposed as a JSP scoped variable. The 
+ * <p>Abstract class that facilitates implementation of conditional actions
+ * where the boolean result is exposed as a JSP scoped variable. The
  * boolean result may then be used as the test condition in a &lt;c:when&gt;
  * action.</p>
- *
+ * <p/>
  * <p>This base class provides support for:</p>
- * 
+ * <p/>
  * <ul>
- *  <li> Conditional processing of the action's body based on the returned value
- *       of the abstract method <tt>condition()</tt>.</li>
- *  <li> Storing the result of <tt>condition()</tt> as a <tt>Boolean</tt> object
- *       into a JSP scoped variable identified by attributes <tt>var</tt> and
- *       <tt>scope</tt>.
+ * <li> Conditional processing of the action's body based on the returned value
+ * of the abstract method <tt>condition()</tt>.</li>
+ * <li> Storing the result of <tt>condition()</tt> as a <tt>Boolean</tt> object
+ * into a JSP scoped variable identified by attributes <tt>var</tt> and
+ * <tt>scope</tt>.
  * </ul>
- * 
+ *
  * @author Shawn Bayern
  */
 
 public abstract class ConditionalTagSupport
-    extends TagSupport
-{
+        extends TagSupport {
     //*********************************************************************
     // Abstract methods
 
     /**
      * <p>Subclasses implement this method to compute the boolean result
-     * of the conditional action. This method is invoked once per tag invocation 
+     * of the conditional action. This method is invoked once per tag invocation
      * by <tt>doStartTag()</tt>.
      *
      * @return a boolean representing the condition that a particular subclass
-     *   uses to drive its conditional logic.
+     *         uses to drive its conditional logic.
      */
     protected abstract boolean condition() throws JspTagException;
 
@@ -64,7 +63,7 @@ public abstract class ConditionalTagSupp
     /**
      * Base constructor to initialize local state.  As with <tt>TagSupport</tt>,
      * subclasses should not implement constructors with arguments, and
-     * no-argument constructors implemented by subclasses must call the 
+     * no-argument constructors implemented by subclasses must call the
      * superclass constructor.
      */
     public ConditionalTagSupport() {
@@ -89,10 +88,11 @@ public abstract class ConditionalTagSupp
         exposeVariables();
 
         // handle conditional behavior
-        if (result)
+        if (result) {
             return EVAL_BODY_INCLUDE;
-        else
+        } else {
             return SKIP_BODY;
+        }
     }
 
     /**
@@ -108,8 +108,8 @@ public abstract class ConditionalTagSupp
     // Private state
 
     private boolean result;             // the saved result of condition()
-    private String var;			// scoped attribute name
-    private int scope;			// scoped attribute scope
+    private String var;            // scoped attribute name
+    private int scope;            // scoped attribute scope
 
 
     //*********************************************************************
@@ -119,10 +119,10 @@ public abstract class ConditionalTagSupp
      * Sets the 'var' attribute.
      *
      * @param var Name of the exported scoped variable storing the result of
-     * <tt>condition()</tt>.
+     *            <tt>condition()</tt>.
      */
     public void setVar(String var) {
-	this.var = var;
+        this.var = var;
     }
 
     /**
@@ -131,15 +131,16 @@ public abstract class ConditionalTagSupp
      * @param scope Scope of the 'var' attribute
      */
     public void setScope(String scope) {
-	if (scope.equalsIgnoreCase("page"))
-	    this.scope = PageContext.PAGE_SCOPE;
-	else if (scope.equalsIgnoreCase("request"))
-	    this.scope = PageContext.REQUEST_SCOPE;
-	else if (scope.equalsIgnoreCase("session"))
-	    this.scope = PageContext.SESSION_SCOPE;
-	else if (scope.equalsIgnoreCase("application"))
-	    this.scope = PageContext.APPLICATION_SCOPE;
-	// TODO: Add error handling?  Needs direction from spec.
+        if (scope.equalsIgnoreCase("page")) {
+            this.scope = PageContext.PAGE_SCOPE;
+        } else if (scope.equalsIgnoreCase("request")) {
+            this.scope = PageContext.REQUEST_SCOPE;
+        } else if (scope.equalsIgnoreCase("session")) {
+            this.scope = PageContext.SESSION_SCOPE;
+        } else if (scope.equalsIgnoreCase("application")) {
+            this.scope = PageContext.APPLICATION_SCOPE;
+        }
+        // TODO: Add error handling?  Needs direction from spec.
     }
 
 
@@ -147,15 +148,18 @@ public abstract class ConditionalTagSupp
     // Utility methods
 
     // expose attributes if we have a non-null 'var'
+
     private void exposeVariables() {
-        if (var != null)
+        if (var != null) {
             pageContext.setAttribute(var, new Boolean(result), scope);
+        }
     }
 
     // initializes internal state
+
     private void init() {
         result = false;                 // not really necessary
-	var = null;
-	scope = PageContext.PAGE_SCOPE;
+        var = null;
+        scope = PageContext.PAGE_SCOPE;
     }
 }

Modified: tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/Config.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/Config.java?rev=1037282&r1=1037281&r2=1037282&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/Config.java (original)
+++ tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/Config.java Sat Nov 20 18:03:48 2010
@@ -13,7 +13,7 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */ 
+ */
 
 package javax.servlet.jsp.jstl.core;
 
@@ -30,31 +30,31 @@ public class Config {
     /*
      * I18N/Formatting actions related configuration data
      */
-    
+
     /**
      * Name of configuration setting for application- (as opposed to browser-)
      * based preferred locale
      */
     public static final String FMT_LOCALE
-	= "javax.servlet.jsp.jstl.fmt.locale";
+            = "javax.servlet.jsp.jstl.fmt.locale";
 
     /**
      * Name of configuration setting for fallback locale
      */
     public static final String FMT_FALLBACK_LOCALE
-	= "javax.servlet.jsp.jstl.fmt.fallbackLocale";
+            = "javax.servlet.jsp.jstl.fmt.fallbackLocale";
 
     /**
      * Name of configuration setting for i18n localization context
      */
     public static final String FMT_LOCALIZATION_CONTEXT
-	= "javax.servlet.jsp.jstl.fmt.localizationContext";
+            = "javax.servlet.jsp.jstl.fmt.localizationContext";
 
     /**
      * Name of localization setting for time zone
      */
     public static final String FMT_TIME_ZONE
-	= "javax.servlet.jsp.jstl.fmt.timeZone";
+            = "javax.servlet.jsp.jstl.fmt.timeZone";
 
     /*
      * SQL actions related configuration data
@@ -64,15 +64,15 @@ public class Config {
      * Name of configuration setting for SQL data source
      */
     public static final String SQL_DATA_SOURCE
-	= "javax.servlet.jsp.jstl.sql.dataSource";
+            = "javax.servlet.jsp.jstl.sql.dataSource";
 
     /**
      * Name of configuration setting for maximum number of rows to be included
      * in SQL query result
      */
     public static final String SQL_MAX_ROWS
-	= "javax.servlet.jsp.jstl.sql.maxRows";
-	
+            = "javax.servlet.jsp.jstl.sql.maxRows";
+
     /*
      * Private constants
      */
@@ -83,293 +83,289 @@ public class Config {
 
     /**
      * Looks up a configuration variable in the given scope.
-     *
+     * <p/>
      * <p> The lookup of configuration variables is performed as if each scope
      * had its own name space, that is, the same configuration variable name
      * in one scope does not replace one stored in a different scope.
      *
-     * @param pc Page context in which the configuration variable is to be
-     * looked up
-     * @param name Configuration variable name
+     * @param pc    Page context in which the configuration variable is to be
+     *              looked up
+     * @param name  Configuration variable name
      * @param scope Scope in which the configuration variable is to be looked
-     * up
-     *
+     *              up
      * @return The <tt>java.lang.Object</tt> associated with the configuration
-     * variable, or null if it is not defined.
+     *         variable, or null if it is not defined.
      */
     public static Object get(PageContext pc, String name, int scope) {
-	switch (scope) {
-	case PageContext.PAGE_SCOPE:
-	    return pc.getAttribute(name + PAGE_SCOPE_SUFFIX, scope);
-	case PageContext.REQUEST_SCOPE:
-	    return pc.getAttribute(name + REQUEST_SCOPE_SUFFIX, scope);
-	case PageContext.SESSION_SCOPE:
-	    return get(pc.getSession(), name);
-	case PageContext.APPLICATION_SCOPE:
-	    return pc.getAttribute(name + APPLICATION_SCOPE_SUFFIX, scope);
-	default:
-	    throw new IllegalArgumentException("unknown scope");
-	}
+        switch (scope) {
+            case PageContext.PAGE_SCOPE:
+                return pc.getAttribute(name + PAGE_SCOPE_SUFFIX, scope);
+            case PageContext.REQUEST_SCOPE:
+                return pc.getAttribute(name + REQUEST_SCOPE_SUFFIX, scope);
+            case PageContext.SESSION_SCOPE:
+                return get(pc.getSession(), name);
+            case PageContext.APPLICATION_SCOPE:
+                return pc.getAttribute(name + APPLICATION_SCOPE_SUFFIX, scope);
+            default:
+                throw new IllegalArgumentException("unknown scope");
+        }
     }
 
     /**
      * Looks up a configuration variable in the "request" scope.
-     *
+     * <p/>
      * <p> The lookup of configuration variables is performed as if each scope
      * had its own name space, that is, the same configuration variable name
      * in one scope does not replace one stored in a different scope.
      *
      * @param request Request object in which the configuration variable is to
-     * be looked up
-     * @param name Configuration variable name
-     *
+     *                be looked up
+     * @param name    Configuration variable name
      * @return The <tt>java.lang.Object</tt> associated with the configuration
-     * variable, or null if it is not defined.
+     *         variable, or null if it is not defined.
      */
     public static Object get(ServletRequest request, String name) {
-	return request.getAttribute(name + REQUEST_SCOPE_SUFFIX);
+        return request.getAttribute(name + REQUEST_SCOPE_SUFFIX);
     }
 
     /**
      * Looks up a configuration variable in the "session" scope.
-     *
+     * <p/>
      * <p> The lookup of configuration variables is performed as if each scope
      * had its own name space, that is, the same configuration variable name
      * in one scope does not replace one stored in a different scope.</p>
      *
      * @param session Session object in which the configuration variable is to
-     * be looked up
-     * @param name Configuration variable name
-     *
+     *                be looked up
+     * @param name    Configuration variable name
      * @return The <tt>java.lang.Object</tt> associated with the configuration
-     * variable, or null if it is not defined, if session is null, or if the session
-     * is invalidated. 
+     *         variable, or null if it is not defined, if session is null, or if the session
+     *         is invalidated.
      */
     public static Object get(HttpSession session, String name) {
         Object ret = null;
         if (session != null) {
             try {
                 ret = session.getAttribute(name + SESSION_SCOPE_SUFFIX);
-            } catch (IllegalStateException ex) {} // when session is invalidated
+            } catch (IllegalStateException ex) {
+            } // when session is invalidated
         }
         return ret;
     }
 
     /**
      * Looks up a configuration variable in the "application" scope.
-     *
+     * <p/>
      * <p> The lookup of configuration variables is performed as if each scope
      * had its own name space, that is, the same configuration variable name
      * in one scope does not replace one stored in a different scope.
      *
      * @param context Servlet context in which the configuration variable is
-     * to be looked up
-     * @param name Configuration variable name
-     *
+     *                to be looked up
+     * @param name    Configuration variable name
      * @return The <tt>java.lang.Object</tt> associated with the configuration
-     * variable, or null if it is not defined.
+     *         variable, or null if it is not defined.
      */
     public static Object get(ServletContext context, String name) {
-	return context.getAttribute(name + APPLICATION_SCOPE_SUFFIX);
+        return context.getAttribute(name + APPLICATION_SCOPE_SUFFIX);
     }
 
     /**
      * Sets the value of a configuration variable in the given scope.
-     *
+     * <p/>
      * <p> Setting the value of a configuration variable is performed as if
      * each scope had its own namespace, that is, the same configuration
      * variable name in one scope does not replace one stored in a different
      * scope.
      *
-     * @param pc Page context in which the configuration variable is to be set
-     * @param name Configuration variable name
+     * @param pc    Page context in which the configuration variable is to be set
+     * @param name  Configuration variable name
      * @param value Configuration variable value
      * @param scope Scope in which the configuration variable is to be set
      */
     public static void set(PageContext pc, String name, Object value,
-			   int scope) {
-	switch (scope) {
-	case PageContext.PAGE_SCOPE:
-	    pc.setAttribute(name + PAGE_SCOPE_SUFFIX, value, scope);
-	    break;
-	case PageContext.REQUEST_SCOPE:
-	    pc.setAttribute(name + REQUEST_SCOPE_SUFFIX, value, scope);
-	    break;
-	case PageContext.SESSION_SCOPE:
-	    pc.setAttribute(name + SESSION_SCOPE_SUFFIX, value, scope);
-	    break;
-	case PageContext.APPLICATION_SCOPE:
-	    pc.setAttribute(name + APPLICATION_SCOPE_SUFFIX, value, scope);
-	    break;
-	default:
-	    throw new IllegalArgumentException("unknown scope");
-	}
+                           int scope) {
+        switch (scope) {
+            case PageContext.PAGE_SCOPE:
+                pc.setAttribute(name + PAGE_SCOPE_SUFFIX, value, scope);
+                break;
+            case PageContext.REQUEST_SCOPE:
+                pc.setAttribute(name + REQUEST_SCOPE_SUFFIX, value, scope);
+                break;
+            case PageContext.SESSION_SCOPE:
+                pc.setAttribute(name + SESSION_SCOPE_SUFFIX, value, scope);
+                break;
+            case PageContext.APPLICATION_SCOPE:
+                pc.setAttribute(name + APPLICATION_SCOPE_SUFFIX, value, scope);
+                break;
+            default:
+                throw new IllegalArgumentException("unknown scope");
+        }
     }
 
     /**
      * Sets the value of a configuration variable in the "request" scope.
-     *
+     * <p/>
      * <p> Setting the value of a configuration variable is performed as if
      * each scope had its own namespace, that is, the same configuration
      * variable name in one scope does not replace one stored in a different
      * scope.
      *
      * @param request Request object in which the configuration variable is to
-     * be set
-     * @param name Configuration variable name
-     * @param value Configuration variable value
+     *                be set
+     * @param name    Configuration variable name
+     * @param value   Configuration variable value
      */
     public static void set(ServletRequest request, String name, Object value) {
-	request.setAttribute(name + REQUEST_SCOPE_SUFFIX, value);
+        request.setAttribute(name + REQUEST_SCOPE_SUFFIX, value);
     }
 
     /**
      * Sets the value of a configuration variable in the "session" scope.
-     *
+     * <p/>
      * <p> Setting the value of a configuration variable is performed as if
      * each scope had its own namespace, that is, the same configuration
      * variable name in one scope does not replace one stored in a different
      * scope.
      *
      * @param session Session object in which the configuration variable is to
-     * be set
-     * @param name Configuration variable name
-     * @param value Configuration variable value
+     *                be set
+     * @param name    Configuration variable name
+     * @param value   Configuration variable value
      */
     public static void set(HttpSession session, String name, Object value) {
-	session.setAttribute(name + SESSION_SCOPE_SUFFIX, value);
+        session.setAttribute(name + SESSION_SCOPE_SUFFIX, value);
     }
 
     /**
      * Sets the value of a configuration variable in the "application" scope.
-     *
+     * <p/>
      * <p> Setting the value of a configuration variable is performed as if
      * each scope had its own namespace, that is, the same configuration
      * variable name in one scope does not replace one stored in a different
      * scope.
      *
      * @param context Servlet context in which the configuration variable is to
-     * be set
-     * @param name Configuration variable name
-     * @param value Configuration variable value
+     *                be set
+     * @param name    Configuration variable name
+     * @param value   Configuration variable value
      */
     public static void set(ServletContext context, String name, Object value) {
-	context.setAttribute(name + APPLICATION_SCOPE_SUFFIX, value);
+        context.setAttribute(name + APPLICATION_SCOPE_SUFFIX, value);
     }
- 
+
     /**
      * Removes a configuration variable from the given scope.
-     *
+     * <p/>
      * <p> Removing a configuration variable is performed as if each scope had
      * its own namespace, that is, the same configuration variable name in one
      * scope does not impact one stored in a different scope.
      *
-     * @param pc Page context from which the configuration variable is to be
-     * removed
-     * @param name Configuration variable name
-     * @param scope Scope from which the configuration variable is to be 
-     * removed
+     * @param pc    Page context from which the configuration variable is to be
+     *              removed
+     * @param name  Configuration variable name
+     * @param scope Scope from which the configuration variable is to be
+     *              removed
      */
     public static void remove(PageContext pc, String name, int scope) {
-	switch (scope) {
-	case PageContext.PAGE_SCOPE:
-	    pc.removeAttribute(name + PAGE_SCOPE_SUFFIX, scope);
-	    break;
-	case PageContext.REQUEST_SCOPE:
-	    pc.removeAttribute(name + REQUEST_SCOPE_SUFFIX, scope);
-	    break;
-	case PageContext.SESSION_SCOPE:
-	    pc.removeAttribute(name + SESSION_SCOPE_SUFFIX, scope);
-	    break;
-	case PageContext.APPLICATION_SCOPE:
-	    pc.removeAttribute(name + APPLICATION_SCOPE_SUFFIX, scope);
-	    break;
-	default:
-	    throw new IllegalArgumentException("unknown scope");
-	}
+        switch (scope) {
+            case PageContext.PAGE_SCOPE:
+                pc.removeAttribute(name + PAGE_SCOPE_SUFFIX, scope);
+                break;
+            case PageContext.REQUEST_SCOPE:
+                pc.removeAttribute(name + REQUEST_SCOPE_SUFFIX, scope);
+                break;
+            case PageContext.SESSION_SCOPE:
+                pc.removeAttribute(name + SESSION_SCOPE_SUFFIX, scope);
+                break;
+            case PageContext.APPLICATION_SCOPE:
+                pc.removeAttribute(name + APPLICATION_SCOPE_SUFFIX, scope);
+                break;
+            default:
+                throw new IllegalArgumentException("unknown scope");
+        }
     }
 
     /**
      * Removes a configuration variable from the "request" scope.
-     *
+     * <p/>
      * <p> Removing a configuration variable is performed as if each scope had
      * its own namespace, that is, the same configuration variable name in one
      * scope does not impact one stored in a different scope.
-     * 
+     *
      * @param request Request object from which the configuration variable is
-     * to be removed
-     * @param name Configuration variable name
+     *                to be removed
+     * @param name    Configuration variable name
      */
     public static void remove(ServletRequest request, String name) {
-	request.removeAttribute(name + REQUEST_SCOPE_SUFFIX);
+        request.removeAttribute(name + REQUEST_SCOPE_SUFFIX);
     }
 
     /**
      * Removes a configuration variable from the "session" scope.
-     *
+     * <p/>
      * <p> Removing a configuration variable is performed as if each scope had
      * its own namespace, that is, the same configuration variable name in one
      * scope does not impact one stored in a different scope.
      *
      * @param session Session object from which the configuration variable is
-     * to be removed
-     * @param name Configuration variable name
+     *                to be removed
+     * @param name    Configuration variable name
      */
     public static void remove(HttpSession session, String name) {
-	session.removeAttribute(name + SESSION_SCOPE_SUFFIX);
+        session.removeAttribute(name + SESSION_SCOPE_SUFFIX);
     }
 
     /**
      * Removes a configuration variable from the "application" scope.
-     *
+     * <p/>
      * <p> Removing a configuration variable is performed as if each scope had
      * its own namespace, that is, the same configuration variable name in one
      * scope does not impact one stored in a different scope.
      *
      * @param context Servlet context from which the configuration variable is
-     * to be removed
-     * @param name Configuration variable name
+     *                to be removed
+     * @param name    Configuration variable name
      */
     public static void remove(ServletContext context, String name) {
-	context.removeAttribute(name + APPLICATION_SCOPE_SUFFIX);
+        context.removeAttribute(name + APPLICATION_SCOPE_SUFFIX);
     }
- 
+
     /**
      * Finds the value associated with a specific configuration setting
      * identified by its context initialization parameter name.
-     *
+     * <p/>
      * <p> For each of the JSP scopes (page, request, session, application),
      * get the value of the configuration variable identified by <tt>name</tt>
      * using method <tt>get()</tt>. Return as soon as a non-null value is
      * found. If no value is found, get the value of the context initialization
      * parameter identified by <tt>name</tt>.
      *
-     * @param pc Page context in which the configuration setting is to be 
-     * searched
+     * @param pc   Page context in which the configuration setting is to be
+     *             searched
      * @param name Context initialization parameter name of the configuration
-     * setting
-     * 
+     *             setting
      * @return The <tt>java.lang.Object</tt> associated with the configuration
-     * setting identified by <tt>name</tt>, or null if it is not defined.
+     *         setting identified by <tt>name</tt>, or null if it is not defined.
      */
     public static Object find(PageContext pc, String name) {
-	Object ret = get(pc, name, PageContext.PAGE_SCOPE);
-	if (ret == null) {
-	    ret = get(pc, name, PageContext.REQUEST_SCOPE);
-	    if (ret == null) {
-		if (pc.getSession() != null) {
-		    // check session only if a session is present
-		    ret = get(pc, name, PageContext.SESSION_SCOPE);
-		}
-		if (ret == null) {
-		    ret = get(pc, name, PageContext.APPLICATION_SCOPE);
-		    if (ret == null) {
-			ret = pc.getServletContext().getInitParameter(name);
-		    }
-		}
-	    }
-	}
+        Object ret = get(pc, name, PageContext.PAGE_SCOPE);
+        if (ret == null) {
+            ret = get(pc, name, PageContext.REQUEST_SCOPE);
+            if (ret == null) {
+                if (pc.getSession() != null) {
+                    // check session only if a session is present
+                    ret = get(pc, name, PageContext.SESSION_SCOPE);
+                }
+                if (ret == null) {
+                    ret = get(pc, name, PageContext.APPLICATION_SCOPE);
+                    if (ret == null) {
+                        ret = pc.getServletContext().getInitParameter(name);
+                    }
+                }
+            }
+        }
 
-	return ret;
+        return ret;
     }
 }

Modified: tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IndexedValueExpression.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IndexedValueExpression.java?rev=1037282&r1=1037281&r2=1037282&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IndexedValueExpression.java (original)
+++ tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IndexedValueExpression.java Sat Nov 20 18:03:48 2010
@@ -46,7 +46,7 @@ public final class IndexedValueExpressio
      * Constructor specifying indexed variable and index.
      *
      * @param valueExpression that evaluates to the indexed variable
-     * @param i index specifying the member
+     * @param i               index specifying the member
      */
     public IndexedValueExpression(ValueExpression valueExpression, int i) {
         orig = valueExpression;
@@ -55,8 +55,12 @@ public final class IndexedValueExpressio
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
 
         IndexedValueExpression that = (IndexedValueExpression) o;
         return i.equals(that.i) && orig.equals(that.orig);
@@ -84,7 +88,7 @@ public final class IndexedValueExpressio
 
     @Override
     public int hashCode() {
-        return orig.hashCode()+i;
+        return orig.hashCode() + i;
     }
 
     @Override

Modified: tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IteratedExpression.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IteratedExpression.java?rev=1037282&r1=1037281&r2=1037282&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IteratedExpression.java (original)
+++ tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IteratedExpression.java Sat Nov 20 18:03:48 2010
@@ -38,14 +38,20 @@ public final class IteratedExpression {
     protected final String delims;
     private Object originalListObject = null;
     private Iterator currentListObject = null;
-    private int currentIndex=0;
-    private enum TypesEnum {Undefined, ACollection, AnIterator, AnEnumeration, AMap, AString};
+    private int currentIndex = 0;
+
+    private enum TypesEnum {
+        Undefined, ACollection, AnIterator, AnEnumeration, AMap, AString
+    }
+
+    ;
     private TypesEnum type = TypesEnum.Undefined;
 
     /**
      * Constructor specifying the expression to access.
      * If the expression evaluates to a String, then it will be split using the specified delimiters.
-     * @param orig the original expression to be accessed
+     *
+     * @param orig   the original expression to be accessed
      * @param delims delimiters to be used to split a String result
      */
     public IteratedExpression(ValueExpression orig, String delims) {
@@ -57,36 +63,36 @@ public final class IteratedExpression {
      * Iterates the original expression and returns the value at the index.
      *
      * @param context against which the expression should be evaluated
-     * @param i the index of the value to return
+     * @param i       the index of the value to return
      * @return the value at the index
      */
     public Object getItem(ELContext context, int i) {
         if (originalListObject == null) {
             originalListObject = orig.getValue(context);
-            if (originalListObject instanceof Collection){
-                type=TypesEnum.ACollection;
+            if (originalListObject instanceof Collection) {
+                type = TypesEnum.ACollection;
             } else if (originalListObject instanceof Iterator) {
-                type=TypesEnum.AnIterator;
+                type = TypesEnum.AnIterator;
             } else if (originalListObject instanceof Enumeration) {
-                type=TypesEnum.AnEnumeration;
+                type = TypesEnum.AnEnumeration;
             } else if (originalListObject instanceof Map) {
-                type=TypesEnum.AMap;
+                type = TypesEnum.AMap;
             } else if (originalListObject instanceof String) { //StringTokens
-                type=TypesEnum.AString;
+                type = TypesEnum.AString;
             } else {
                 //it's of some other type ... should never get here
                 throw new RuntimeException("IteratedExpression.getItem: Object not of correct type.");
             }
             currentListObject = returnNewIterator(originalListObject, type);
         }
-        Object currentObject=null;
-        if (i<currentIndex) {
+        Object currentObject = null;
+        if (i < currentIndex) {
             currentListObject = returnNewIterator(originalListObject, type);
             currentIndex = 0;
-        } 
-        for (;currentIndex<=i;currentIndex++) {
+        }
+        for (; currentIndex <= i; currentIndex++) {
             if (currentListObject.hasNext()) {
-                currentObject= currentListObject.next();
+                currentObject = currentListObject.next();
             } else {
                 throw new RuntimeException("IteratedExpression.getItem: Index out of Bounds");
             }
@@ -106,52 +112,52 @@ public final class IteratedExpression {
     private Iterator returnNewIterator(Object o, TypesEnum type) {
         Iterator i = null;
         switch (type) {
-        case ACollection: 
-            i = ((Collection)o).iterator();
-            break;
-        case AnIterator: 
-            if (currentListObject==null) {
-                //first time through ... need to create Vector for originalListObject
-                Vector v = new Vector();
-                Iterator myI = (Iterator)o;
-                while (myI.hasNext()) {
-                    v.add(myI.next());
+            case ACollection:
+                i = ((Collection) o).iterator();
+                break;
+            case AnIterator:
+                if (currentListObject == null) {
+                    //first time through ... need to create Vector for originalListObject
+                    Vector v = new Vector();
+                    Iterator myI = (Iterator) o;
+                    while (myI.hasNext()) {
+                        v.add(myI.next());
+                    }
+                    originalListObject = v;
                 }
-                originalListObject = v;
-            }
-            i = ((Vector)originalListObject).iterator();
-            break;
-        case AnEnumeration: 
-            if (currentListObject==null) {
-                //first time through ... need to create Vector for originalListObject
-                Vector v = new Vector();
-                Enumeration myE = (Enumeration)o;
-                while (myE.hasMoreElements()) {
-                    v.add(myE.nextElement());
+                i = ((Vector) originalListObject).iterator();
+                break;
+            case AnEnumeration:
+                if (currentListObject == null) {
+                    //first time through ... need to create Vector for originalListObject
+                    Vector v = new Vector();
+                    Enumeration myE = (Enumeration) o;
+                    while (myE.hasMoreElements()) {
+                        v.add(myE.nextElement());
+                    }
+                    originalListObject = v;
                 }
-                originalListObject = v;
-            }
-            i = ((Vector)originalListObject).iterator();
-            break;
-        case AMap: 
-            Set s = ((Map)o).entrySet();
-            i = s.iterator();
-            break;
-        case AString: 
-            if (currentListObject==null) {
-                //first time through ... need to create Vector for originalListObject
-                Vector v = new Vector();
-                StringTokenizer st = new StringTokenizer((String)o, delims);
-                while (st.hasMoreElements()) {
-                    v.add(st.nextElement());
+                i = ((Vector) originalListObject).iterator();
+                break;
+            case AMap:
+                Set s = ((Map) o).entrySet();
+                i = s.iterator();
+                break;
+            case AString:
+                if (currentListObject == null) {
+                    //first time through ... need to create Vector for originalListObject
+                    Vector v = new Vector();
+                    StringTokenizer st = new StringTokenizer((String) o, delims);
+                    while (st.hasMoreElements()) {
+                        v.add(st.nextElement());
+                    }
+                    originalListObject = v;
                 }
-                originalListObject = v;
-            }
-            i = ((Vector)originalListObject).iterator();
-            break;
-        default: //do Nothing ... this is not possible 
-            break;
+                i = ((Vector) originalListObject).iterator();
+                break;
+            default: //do Nothing ... this is not possible
+                break;
         }
-        return i;        
+        return i;
     }
 }
\ No newline at end of file

Modified: tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IteratedValueExpression.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IteratedValueExpression.java?rev=1037282&r1=1037281&r2=1037282&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IteratedValueExpression.java (original)
+++ tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/IteratedValueExpression.java Sat Nov 20 18:03:48 2010
@@ -38,11 +38,15 @@ public final class IteratedValueExpressi
         iteratedExpression = _iteratedExpr;
         this.i = i;
     }
-    
+
     @Override
     public boolean equals(Object obj) {
-        if (this == obj) return true;
-        if (obj == null || getClass() != obj.getClass()) return false;
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null || getClass() != obj.getClass()) {
+            return false;
+        }
 
         IteratedValueExpression that = (IteratedValueExpression) obj;
         return i == that.i && iteratedExpression.equals(that.iteratedExpression);
@@ -60,17 +64,17 @@ public final class IteratedValueExpressi
 
     @Override
     public Class getType(ELContext elContext) {
-        return iteratedExpression.getValueExpression().getType(elContext); 
+        return iteratedExpression.getValueExpression().getType(elContext);
     }
 
     @Override
     public Object getValue(ELContext elContext) {
-        return iteratedExpression.getItem(elContext, i); 
+        return iteratedExpression.getItem(elContext, i);
     }
 
     @Override
     public int hashCode() {
-        return iteratedExpression.hashCode()+i;
+        return iteratedExpression.hashCode() + i;
     }
 
     @Override

Modified: tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTag.java?rev=1037282&r1=1037281&r2=1037282&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTag.java (original)
+++ tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTag.java Sat Nov 20 18:03:48 2010
@@ -13,7 +13,7 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */ 
+ */
 
 package javax.servlet.jsp.jstl.core;
 
@@ -25,7 +25,7 @@ import javax.servlet.jsp.tagext.Tag;
  * with <tt>javax.servlet.jsp.tagext.IterationTag</tt> as defined in JSP 1.2.
  * LoopTag establishes a mechanism for iteration tags to be recognized
  * and for type-safe implicit collaboration with custom subtags.
- * 
+ * <p/>
  * <p>In most cases, it will not be necessary to implement this interface
  * manually, for a base support class (<tt>LoopTagSupport</tt>) is provided
  * to facilitate implementation.</p>

Modified: tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTagStatus.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTagStatus.java?rev=1037282&r1=1037281&r2=1037282&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTagStatus.java (original)
+++ tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTagStatus.java Sat Nov 20 18:03:48 2010
@@ -13,7 +13,7 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */ 
+ */
 
 package javax.servlet.jsp.jstl.core;
 
@@ -25,7 +25,7 @@ package javax.servlet.jsp.jstl.core;
  * either the first or last in the iteration.  It also lets authors
  * use the status object to obtain information about the iteration range,
  * step, and current object.</p>
- *
+ * <p/>
  * <p>Environments that require more status can extend this interface.</p>
  *
  * @author Shawn Bayern
@@ -59,7 +59,7 @@ public interface LoopTagStatus {
      * count is a relative, 1-based sequence number identifying the
      * current "round" of iteration (in context with all rounds the
      * current iteration will perform).</p>
-     *
+     * <p/>
      * <p>As an example, an iteration with begin = 5, end = 15, and step =
      * 5 produces the counts 1, 2, and 3 in that order.</p>
      *
@@ -74,9 +74,9 @@ public interface LoopTagStatus {
      * index of the current 'item' in the context of its underlying
      * collection.  It is always that case that a true result from
      * isFirst() implies getCount() == 1.
-     * 
+     *
      * @return <tt>true</tt> if the current round is the first in the
-     * iteration, <tt>false</tt> otherwise.
+     *         iteration, <tt>false</tt> otherwise.
      */
     public boolean isFirst();
 
@@ -87,9 +87,9 @@ public interface LoopTagStatus {
      * status of the underlying Iterator; it refers to whether or not
      * the current round will be the final round of iteration for the
      * tag associated with this LoopTagStatus.
-     * 
+     *
      * @return <tt>true</tt> if the current round is the last in the
-     * iteration, <tt>false</tt> otherwise.
+     *         iteration, <tt>false</tt> otherwise.
      */
     public boolean isLast();
 
@@ -98,7 +98,7 @@ public interface LoopTagStatus {
      * or null if no 'begin' attribute was specified.
      *
      * @return the 'begin' value for the associated tag, or null
-     * if no 'begin' attribute was specified
+     *         if no 'begin' attribute was specified
      */
     public Integer getBegin();
 
@@ -107,7 +107,7 @@ public interface LoopTagStatus {
      * or null if no 'end' attribute was specified.
      *
      * @return the 'end' value for the associated tag, or null
-     * if no 'end' attribute was specified
+     *         if no 'end' attribute was specified
      */
     public Integer getEnd();
 
@@ -116,7 +116,7 @@ public interface LoopTagStatus {
      * or null if no 'step' attribute was specified.
      *
      * @return the 'step' value for the associated tag, or null
-     * if no 'step' attribute was specified
+     *         if no 'step' attribute was specified
      */
     public Integer getStep();
 

Modified: tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTagSupport.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTagSupport.java?rev=1037282&r1=1037281&r2=1037282&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTagSupport.java (original)
+++ tomcat/taglibs/standard/trunk/spec/src/main/java/javax/servlet/jsp/jstl/core/LoopTagSupport.java Sat Nov 20 18:03:48 2010
@@ -13,7 +13,7 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */ 
+ */
 
 package javax.servlet.jsp.jstl.core;
 
@@ -29,31 +29,31 @@ import javax.servlet.jsp.tagext.TryCatch
 
 /**
  * <p>Base support class to facilitate implementation of iteration tags.</p>
- *
+ * <p/>
  * <p>Since most iteration tags will behave identically with respect to
  * actual iterative behavior, JSTL provides this
  * base support class to facilitate implementation.  Many iteration tags
- * will extend this and merely implement the <tt>hasNext()</tt> and 
+ * will extend this and merely implement the <tt>hasNext()</tt> and
  * <tt>next()</tt> methods
  * to provide contents for the handler to iterate over.</p>
- *
+ * <p/>
  * <p>In particular, this base class provides support for:</p>
- * 
+ * <p/>
  * <ul>
- *  <li> Iteration control, based on protected <tt>prepare()</tt>, <tt>next()</tt>,
- *       and <tt>hasNext()</tt> methods
- *  <li> Subsetting (<tt>begin</tt>, <tt>end</tt>, <tt>step></tt>functionality, 
- *       including validation
- *       of subset parameters for sensibility)
- *  <li> item retrieval (<tt>getCurrent()</tt>)
- *  <li> status retrieval (<tt>LoopTagStatus</tt>)
- *  <li> exposing attributes (set by <tt>var</tt> and <tt>varStatus</tt> attributes)
+ * <li> Iteration control, based on protected <tt>prepare()</tt>, <tt>next()</tt>,
+ * and <tt>hasNext()</tt> methods
+ * <li> Subsetting (<tt>begin</tt>, <tt>end</tt>, <tt>step></tt>functionality,
+ * including validation
+ * of subset parameters for sensibility)
+ * <li> item retrieval (<tt>getCurrent()</tt>)
+ * <li> status retrieval (<tt>LoopTagStatus</tt>)
+ * <li> exposing attributes (set by <tt>var</tt> and <tt>varStatus</tt> attributes)
  * </ul>
- *
+ * <p/>
  * <p>In providing support for these tasks, <tt>LoopTagSupport</tt> contains
  * certain control variables that act to modify the iteration.  Accessors
  * are provided for these control variables when the variables represent
- * information needed or wanted at translation time (e.g., <tt>var</tt>, 
+ * information needed or wanted at translation time (e.g., <tt>var</tt>,
  * <tt>varStatus</tt>).  For
  * other variables, accessors cannot be provided here since subclasses
  * may differ on their implementations of how those accessors are received.
@@ -66,9 +66,8 @@ import javax.servlet.jsp.tagext.TryCatch
  */
 
 public abstract class LoopTagSupport
-    extends TagSupport
-    implements LoopTag, IterationTag, TryCatchFinally
-{
+        extends TagSupport
+        implements LoopTag, IterationTag, TryCatchFinally {
     //*********************************************************************
     // 'Protected' state 
 
@@ -82,7 +81,9 @@ public abstract class LoopTagSupport
      * is in the doStartTag() method of an EL-aware subclass.)
      */
 
-    /** Starting index ('begin' attribute) */
+    /**
+     * Starting index ('begin' attribute)
+     */
     protected int begin;
 
     /**
@@ -93,22 +94,32 @@ public abstract class LoopTagSupport
      */
     protected int end;
 
-    /** Iteration step ('step' attribute) */
+    /**
+     * Iteration step ('step' attribute)
+     */
     protected int step;
 
-    /** Boolean flag indicating whether 'begin' was specified. */
+    /**
+     * Boolean flag indicating whether 'begin' was specified.
+     */
     protected boolean beginSpecified;
 
-    /** Boolean flag indicating whether 'end' was specified. */
+    /**
+     * Boolean flag indicating whether 'end' was specified.
+     */
     protected boolean endSpecified;
 
-    /** Boolean flag indicating whether 'step' was specified. */
+    /**
+     * Boolean flag indicating whether 'step' was specified.
+     */
     protected boolean stepSpecified;
 
-    /** Attribute-exposing control */
+    /**
+     * Attribute-exposing control
+     */
     protected String itemId, statusId;
 
-    protected ValueExpression deferredExpression=null;
+    protected ValueExpression deferredExpression = null;
 
     //*********************************************************************
     // 'Private' state (implementation details)
@@ -159,7 +170,7 @@ public abstract class LoopTagSupport
      * <p>Returns the next object over which the tag should iterate.  This
      * method must be provided by concrete subclasses of LoopTagSupport
      * to inform the base logic about what objects it should iterate over.</p>
-     *
+     * <p/>
      * <p>It is expected that this method will generally be backed by an
      * Iterator, but this will not always be the case.  In particular, if
      * retrieving the next object raises the possibility of an exception
@@ -167,12 +178,12 @@ public abstract class LoopTagSupport
      * to the JSP container as a JspTagException; a standalone Iterator
      * would not be able to do this.  (This explains why LoopTagSupport
      * does not simply call for an Iterator from its subtags.)</p>
-     * 
+     *
      * @return the java.lang.Object to use in the next round of iteration
-     * @exception java.util.NoSuchElementException
-     *            if next() is called but no new elements are available
-     * @exception javax.servlet.jsp.JspTagException
-     *            for other, unexpected exceptions
+     * @throws java.util.NoSuchElementException
+     *          if next() is called but no new elements are available
+     * @throws javax.servlet.jsp.JspTagException
+     *          for other, unexpected exceptions
      */
     protected abstract Object next() throws JspTagException;
 
@@ -181,24 +192,26 @@ public abstract class LoopTagSupport
      * over which to iterate.  This method must be provided by concrete
      * subclasses of LoopTagSupport to assist the iterative logic
      * provided by the supporting base class.</p>
-     *  
+     * <p/>
      * <p>See <a href="#next()">next</a> for more information about the
      * purpose and expectations behind this tag.</p>
      *
      * @return <tt>true</tt> if there is at least one more item to iterate
      *         over, <tt>false</tt> otherwise
-     * @exception javax.servlet.jsp.JspTagException
+     * @throws javax.servlet.jsp.JspTagException
+     *
      * @see #next
      */
     protected abstract boolean hasNext() throws JspTagException;
 
     /**
      * <p>Prepares for a single tag invocation.  Specifically, allows
-     * subclasses to prepare for calls to hasNext() and next(). 
+     * subclasses to prepare for calls to hasNext() and next().
      * Subclasses can assume that prepare() will be called once for
      * each invocation of doStartTag() in the superclass.</p>
      *
-     * @exception javax.servlet.jsp.JspTagException
+     * @throws javax.servlet.jsp.JspTagException
+     *
      */
     protected abstract void prepare() throws JspTagException;
 
@@ -238,10 +251,12 @@ public abstract class LoopTagSupport
 
         // get the item we're interested in
         if (hasNext())
-            // index is 0-based, so we don't update it for the first item
+        // index is 0-based, so we don't update it for the first item
+        {
             item = next();
-        else
+        } else {
             return SKIP_BODY;
+        }
 
         /*
          * now discard anything we have to "step" over.
@@ -272,8 +287,9 @@ public abstract class LoopTagSupport
         if (hasNext() && !atEnd()) {
             index++;
             item = next();
-        } else
+        } else {
             return SKIP_BODY;
+        }
 
         /*
          * now discard anything we have to "step" over.
@@ -289,24 +305,24 @@ public abstract class LoopTagSupport
 
     /**
      * Removes any attributes that this LoopTagSupport set.
-     *
+     * <p/>
      * <p> These attributes are intended to support scripting variables with
      * NESTED scope, so we don't want to pollute attribute space by leaving
      * them lying around.
      */
     public void doFinally() {
-	/*
-	 * Make sure to un-expose variables, restoring them to their
-	 * prior values, if applicable.
-         */
-	unExposeVariables();
+        /*
+    * Make sure to un-expose variables, restoring them to their
+    * prior values, if applicable.
+        */
+        unExposeVariables();
     }
 
     /**
      * Rethrows the given Throwable.
      */
     public void doCatch(Throwable t) throws Throwable {
-	throw t;
+        throw t;
     }
 
     //*********************************************************************
@@ -325,6 +341,7 @@ public abstract class LoopTagSupport
      * Subclasses can override this if necessary, but such a need is
      * expected to be rare.)
      */
+
     public Object getCurrent() {
         return item;
     }
@@ -336,6 +353,7 @@ public abstract class LoopTagSupport
      * implementation of subclasses that are happy with reasonable default
      * behavior.)
      */
+
     public LoopTagStatus getLoopStatus() {
 
         // local implementation with reasonable default behavior
@@ -356,35 +374,45 @@ public abstract class LoopTagSupport
                  */
                 return (LoopTagSupport.this.getCurrent());
             }
+
             public int getIndex() {
                 return (index + begin);       // our 'index' isn't getIndex()
             }
+
             public int getCount() {
                 return (count);
             }
+
             public boolean isFirst() {
                 return (index == 0);          // our 'index' isn't getIndex()
             }
+
             public boolean isLast() {
                 return (last);                // use cached value
             }
+
             public Integer getBegin() {
-                if (beginSpecified)
+                if (beginSpecified) {
                     return (new Integer(begin));
-                else
+                } else {
                     return null;
+                }
             }
+
             public Integer getEnd() {
-                if (endSpecified)
+                if (endSpecified) {
                     return (new Integer(end));
-                else
+                } else {
                     return null;
+                }
             }
+
             public Integer getStep() {
-                if (stepSpecified)
+                if (stepSpecified) {
                     return (new Integer(step));
-                else
+                } else {
                     return null;
+                }
             }
         }
 
@@ -393,8 +421,9 @@ public abstract class LoopTagSupport
          * implementation, we just need one per instance, but I'd rather
          * not keep the reference around once release() has been called.
          */
-        if (status == null)
+        if (status == null) {
             status = new Status();
+        }
 
         return status;
     }
@@ -414,7 +443,7 @@ public abstract class LoopTagSupport
      * Sets the 'var' attribute.
      *
      * @param id Name of the exported scoped variable storing the current item
-     * of the iteration.
+     *           of the iteration.
      */
     public void setVar(String id) {
         this.itemId = id;
@@ -424,7 +453,7 @@ public abstract class LoopTagSupport
      * Sets the 'varStatus' attribute.
      *
      * @param statusId Name of the exported scoped variable storing the status
-     * of the iteration.
+     *                 of the iteration.
      */
     public void setVarStatus(String statusId) {
         this.statusId = statusId;
@@ -445,8 +474,9 @@ public abstract class LoopTagSupport
      * expected to propagate up if it isn't
      */
     protected void validateBegin() throws JspTagException {
-        if (begin < 0)
+        if (begin < 0) {
             throw new JspTagException("'begin' < 0");
+        }
     }
 
     /**
@@ -454,8 +484,9 @@ public abstract class LoopTagSupport
      * expected to propagate up if it isn't
      */
     protected void validateEnd() throws JspTagException {
-        if (end < 0)
+        if (end < 0) {
             throw new JspTagException("'end' < 0");
+        }
     }
 
     /**
@@ -463,15 +494,18 @@ public abstract class LoopTagSupport
      * expected to propagate up if it isn't
      */
     protected void validateStep() throws JspTagException {
-        if (step < 1)
+        if (step < 1) {
             throw new JspTagException("'step' <= 0");
+        }
     }
 
 
     //*********************************************************************
     // Private utility methods
 
-    /** (Re)initializes state (during release() or construction) */
+    /**
+     * (Re)initializes state (during release() or construction)
+     */
     private void init() {
         // defaults for internal bookkeeping
         index = 0;              // internal index always starts at 0
@@ -491,14 +525,16 @@ public abstract class LoopTagSupport
         statusId = null;        // when not specified, no variable exported
     }
 
-    /** Sets 'last' appropriately. */
+    /**
+     * Sets 'last' appropriately.
+     */
     private void calibrateLast() throws JspTagException {
         /*
          * the current round is the last one if (a) there are no remaining
          * elements, or (b) the next one is beyond the 'end'.
          */
         last = !hasNext() || atEnd() ||
-            (end != -1 && (begin + index + step > end));
+                (end != -1 && (begin + index + step > end));
     }
 
     /**
@@ -508,7 +544,7 @@ public abstract class LoopTagSupport
      */
     private void exposeVariables() throws JspTagException {
 
-        if (deferredExpression==null) {
+        if (deferredExpression == null) {
             /*
              * We need to support null items returned from next(); we
              * do this simply by passing such non-items through to the
@@ -526,21 +562,23 @@ public abstract class LoopTagSupport
              * correctly.
              */
             if (itemId != null) {
-                if (getCurrent() == null)
+                if (getCurrent() == null) {
                     pageContext.removeAttribute(itemId, PageContext.PAGE_SCOPE);
-                else
+                } else {
                     pageContext.setAttribute(itemId, getCurrent());
+                }
             }
         } else { //this is using a DeferredExpression
             ELContext myELContext = pageContext.getELContext();
             VariableMapper vm = myELContext.getVariableMapper();
-            vm.setVariable(itemId, (ValueExpression)getCurrent());
+            vm.setVariable(itemId, (ValueExpression) getCurrent());
         }
         if (statusId != null) {
-            if (getLoopStatus() == null)
+            if (getLoopStatus() == null) {
                 pageContext.removeAttribute(statusId, PageContext.PAGE_SCOPE);
-            else
+            } else {
                 pageContext.setAttribute(statusId, getLoopStatus());
+            }
         }
 
     }
@@ -550,18 +588,20 @@ public abstract class LoopTagSupport
      * restores them to their prior values (and scopes).
      */
     private void unExposeVariables() {
-        if (deferredExpression==null) {
+        if (deferredExpression == null) {
             // "nested" variables are now simply removed
-        	if (itemId != null)
-                    pageContext.removeAttribute(itemId, PageContext.PAGE_SCOPE);
+            if (itemId != null) {
+                pageContext.removeAttribute(itemId, PageContext.PAGE_SCOPE);
+            }
         } else {
             //we're deferred ... remove variable mapping
             ELContext myELContext = pageContext.getELContext();
             VariableMapper vm = myELContext.getVariableMapper();
             vm.setVariable(itemId, null);
         }
-	if (statusId != null)
-	    pageContext.removeAttribute(statusId, PageContext.PAGE_SCOPE);
+        if (statusId != null) {
+            pageContext.removeAttribute(statusId, PageContext.PAGE_SCOPE);
+        }
     }
 
     /**
@@ -596,8 +636,9 @@ public abstract class LoopTagSupport
      * don't want factor in the 'begin' value already.
      */
     private void discardIgnoreSubset(int n) throws JspTagException {
-	while (n-- > 0 && hasNext())
-	    next();
+        while (n-- > 0 && hasNext()) {
+            next();
+        }
     }
 
     /**
@@ -609,6 +650,7 @@ public abstract class LoopTagSupport
     private boolean atEnd() {
         return ((end != -1) && (begin + index >= end));
     }
+
     /**
      * Get the delimiter for string tokens. Used only for constructing
      * the deferred expression for it.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message