tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1187803 [5/6] - in /tomcat/trunk/java/org/apache/jasper: ./ compiler/ compiler/tagplugin/ el/ resources/ runtime/ security/ servlet/ tagplugins/jstl/ tagplugins/jstl/core/ util/ xmlparser/
Date Sat, 22 Oct 2011 21:18:07 GMT
Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Import.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Import.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Import.java (original)
+++ tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Import.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,25 +23,25 @@ import org.apache.jasper.compiler.tagplu
 import org.apache.jasper.tagplugins.jstl.Util;
 
 public class Import implements TagPlugin {
-    
+
     @Override
     public void doTag(TagPluginContext ctxt) {
         boolean hasContext, hasVar, hasScope, hasVarReader, hasCharEncoding;
-        
+
         //flags
         hasContext  = ctxt.isAttributeSpecified("context");
         hasVar = ctxt.isAttributeSpecified("var");
         hasScope = ctxt.isAttributeSpecified("scope");
         hasVarReader = ctxt.isAttributeSpecified("varReader");
         hasCharEncoding = ctxt.isAttributeSpecified("charEncoding");
-        
+
         //variables' names
-        String urlName = ctxt.getTemporaryVariableName();           
-        String contextName = ctxt.getTemporaryVariableName();       
+        String urlName = ctxt.getTemporaryVariableName();
+        String contextName = ctxt.getTemporaryVariableName();
         String iauName = ctxt.getTemporaryVariableName();           // is absolute url
         String urlObjName = ctxt.getTemporaryVariableName();        //URL object
         String ucName = ctxt.getTemporaryVariableName();            //URLConnection
-        String inputStreamName = ctxt.getTemporaryVariableName();   
+        String inputStreamName = ctxt.getTemporaryVariableName();
         String tempReaderName = ctxt.getTemporaryVariableName();
         String tempReaderName2 = ctxt.getTemporaryVariableName();
         String charSetName = ctxt.getTemporaryVariableName();
@@ -55,115 +55,115 @@ public class Import implements TagPlugin
         String brName = ctxt.getTemporaryVariableName();            //BufferedReader name
         String sbName = ctxt.getTemporaryVariableName();            //StringBuilder name
         String tempStringName = ctxt.getTemporaryVariableName();
-        
+
         //is absolute url
         ctxt.generateJavaSource("boolean " + iauName + ";");
-        
+
         //get the url value
         ctxt.generateJavaSource("String " + urlName + " = ");
         ctxt.generateAttribute("url");
         ctxt.generateJavaSource(";");
-        
+
         //validate the url
         ctxt.generateJavaSource("if(" + urlName + " == null || " + urlName + ".equals(\"\")){");
         ctxt.generateJavaSource("    throw new JspTagException(\"The \\\"url\\\" attribute " +
         "illegally evaluated to \\\"null\\\" or \\\"\\\" in <import>\");");
         ctxt.generateJavaSource("}");
-        
+
         //initialize the is_absolute_url
         ctxt.generateJavaSource(iauName + " = " +
                 "org.apache.jasper.tagplugins.jstl.Util.isAbsoluteUrl(" + urlName + ");");
-        
+
         //validate the context
         if(hasContext){
-            
+
             ctxt.generateJavaSource("String " + contextName + " = ");
             ctxt.generateAttribute("context");
             ctxt.generateJavaSource(";");
-            
+
             ctxt.generateJavaSource("if((!" + contextName + ".startsWith(\"/\")) " +
                     "|| (!" + urlName + ".startsWith(\"/\"))){");
             ctxt.generateJavaSource("    throw new JspTagException" +
                     "(\"In URL tags, when the \\\"context\\\" attribute is specified, " +
             "values of both \\\"context\\\" and \\\"url\\\" must start with \\\"/\\\".\");");
             ctxt.generateJavaSource("}");
-            
+
         }
-        
+
         //define charset
         ctxt.generateJavaSource("String " + charSetName + " = null;");
-        
+
         //if the charEncoding attribute is specified
         if(hasCharEncoding){
-            
+
             //initialize the charEncoding
             ctxt.generateJavaSource("String " + charEncodingName + " = ");
             ctxt.generateAttribute("charEncoding");
             ctxt.generateJavaSource(";");
-            
+
             //assign appropriate value to the charset
             ctxt.generateJavaSource("if(null != " + charEncodingName + " " +
                     "&& !" + charEncodingName + ".equals(\"\")){");
-            ctxt.generateJavaSource("    " + charSetName + " = " 
+            ctxt.generateJavaSource("    " + charSetName + " = "
                     + charEncodingName + ";");
             ctxt.generateJavaSource("}");
         }
-        
+
         //reshape the url string
         ctxt.generateJavaSource("if(!"+iauName+"){");
         ctxt.generateJavaSource("    if(!" + urlName + ".startsWith(\"/\")){");
         ctxt.generateJavaSource("        String " + servletPathName + " = " +
         "((HttpServletRequest)pageContext.getRequest()).getServletPath();");
-        ctxt.generateJavaSource("        " + urlName + " = " 
+        ctxt.generateJavaSource("        " + urlName + " = "
                 + servletPathName + ".substring(0," + servletPathName + ".lastIndexOf('/')) + '/' + " + urlName + ";");
         ctxt.generateJavaSource("    }");
         ctxt.generateJavaSource("}");
-        
+
         //if the varReader attribute specified
         if(hasVarReader){
-            
+
             //get the String value of varReader
             ctxt.generateJavaSource("String " + varReaderName + " = ");
             ctxt.generateAttribute("varReader");
             ctxt.generateJavaSource(";");
-            
+
             //if the url is absolute url
             ctxt.generateJavaSource("if(" + iauName + "){");
-            
+
             //get the content of the target
             ctxt.generateJavaSource("    java.net.URL " + urlObjName + " = new java.net.URL(" + urlName + ");");
-            ctxt.generateJavaSource("    java.net.URLConnection " + ucName + " = " 
+            ctxt.generateJavaSource("    java.net.URLConnection " + ucName + " = "
                     + urlObjName + ".openConnection();");
-            ctxt.generateJavaSource("    java.io.InputStream " + inputStreamName + " = " 
+            ctxt.generateJavaSource("    java.io.InputStream " + inputStreamName + " = "
                     + ucName + ".getInputStream();");
-            
+
             ctxt.generateJavaSource("    if(" + charSetName + " == null){");
-            ctxt.generateJavaSource("        String " + contentTypeName + " = " 
+            ctxt.generateJavaSource("        String " + contentTypeName + " = "
                     + ucName + ".getContentType();");
             ctxt.generateJavaSource("        if(null != " + contentTypeName + "){");
             ctxt.generateJavaSource("            " + charSetName + " = " +
                     "org.apache.jasper.tagplugins.jstl.Util.getContentTypeAttribute(" + contentTypeName + ", \"charset\");");
-            ctxt.generateJavaSource("            if(" + charSetName + " == null) " 
+            ctxt.generateJavaSource("            if(" + charSetName + " == null) "
                     + charSetName + " = org.apache.jasper.tagplugins.jstl.Util.DEFAULT_ENCODING;");
             ctxt.generateJavaSource("        }else{");
             ctxt.generateJavaSource("            " + charSetName + " = org.apache.jasper.tagplugins.jstl.Util.DEFAULT_ENCODING;");
             ctxt.generateJavaSource("        }");
             ctxt.generateJavaSource("    }");
-            
+
             if(!hasCharEncoding){
                 ctxt.generateJavaSource("    String " + contentTypeName + " = " + ucName + ".getContentType();");
             }
-            
+
             //define the Reader
             ctxt.generateJavaSource("    java.io.Reader " + tempReaderName + " = null;");
-            
+
             //initialize the Reader object
             ctxt.generateJavaSource("    try{");
             ctxt.generateJavaSource("        " + tempReaderName + " = new java.io.InputStreamReader(" + inputStreamName + ", " + charSetName + ");");
             ctxt.generateJavaSource("    }catch(Exception ex){");
             ctxt.generateJavaSource("        " + tempReaderName + " = new java.io.InputStreamReader(" + inputStreamName + ", org.apache.jasper.tagplugins.jstl.Util.DEFAULT_ENCODING);");
             ctxt.generateJavaSource("    }");
-            
+
             //validate the response
             ctxt.generateJavaSource("    if(" + ucName + " instanceof java.net.HttpURLConnection){");
             ctxt.generateJavaSource("        int status = ((java.net.HttpURLConnection) " + ucName + ").getResponseCode();");
@@ -171,19 +171,19 @@ public class Import implements TagPlugin
             ctxt.generateJavaSource("            throw new JspTagException(status + \" \" + " + urlName + ");");
             ctxt.generateJavaSource("        }");
             ctxt.generateJavaSource("    }");
-            
+
             //set attribute in the page context scope
             ctxt.generateJavaSource("    pageContext.setAttribute(" + varReaderName + ", " + tempReaderName + ");");
-            
+
             //if the url is relative
             ctxt.generateJavaSource("}else{");
-            
+
             //if the url is relative, http request is needed
             ctxt.generateJavaSource("    if (!(pageContext.getRequest() instanceof HttpServletRequest  " +
             "&& pageContext.getResponse() instanceof HttpServletResponse)){");
             ctxt.generateJavaSource("        throw new JspTagException(\"Relative <import> from non-HTTP request not allowed\");");
             ctxt.generateJavaSource("    }");
-            
+
             //get the servlet context of the context defined in the context attribute
             ctxt.generateJavaSource("    ServletContext " + servletContextName + " = null;");
             if(hasContext){
@@ -195,7 +195,7 @@ public class Import implements TagPlugin
             }else{
                 ctxt.generateJavaSource("    " + servletContextName + " = pageContext.getServletContext();");
             }
-            
+
             //
             ctxt.generateJavaSource("    if(" + servletContextName + " == null){");
             if(hasContext){
@@ -204,11 +204,11 @@ public class Import implements TagPlugin
                 ctxt.generateJavaSource("        throw new JspTagException(\"Unable to get RequestDispatcher for  URL: \\\" \" +" + urlName + "+ \" \\\". Verify values and/or enable cross context access.\");");
             }
             ctxt.generateJavaSource("    }");
-            
+
             //get the request dispatcher
             ctxt.generateJavaSource("    RequestDispatcher " + requestDispatcherName + " = " + servletContextName + ".getRequestDispatcher(org.apache.jasper.tagplugins.jstl.Util.stripSession("+urlName+"));");
             ctxt.generateJavaSource("    if(" + requestDispatcherName + " == null) throw new JspTagException(org.apache.jasper.tagplugins.jstl.Util.stripSession("+urlName+"));");
-            
+
             //initialize a ImportResponseWrapper to include the resource
             ctxt.generateJavaSource("    org.apache.jasper.tagplugins.jstl.Util.ImportResponseWrapper " + irwName + " = new org.apache.jasper.tagplugins.jstl.Util.ImportResponseWrapper((HttpServletResponse) pageContext.getResponse());");
             ctxt.generateJavaSource("    if(" + charSetName + " == null){");
@@ -228,30 +228,30 @@ public class Import implements TagPlugin
             ctxt.generateJavaSource("        else");
             ctxt.generateJavaSource("            throw new JspException(rc);");
             ctxt.generateJavaSource("    }");
-            
+
             //validate the response status
             ctxt.generateJavaSource("    if(" + irwName + ".getStatus() < 200 || " + irwName + ".getStatus() > 299){");
             ctxt.generateJavaSource("        throw new JspTagException(" + irwName + ".getStatus()+\" \" + org.apache.jasper.tagplugins.jstl.Util.stripSession(" + urlName + "));");
             ctxt.generateJavaSource("    }");
-            
+
             //push in the page context
             ctxt.generateJavaSource("    java.io.Reader " + tempReaderName + " = new java.io.StringReader(" + irwName + ".getString());");
             ctxt.generateJavaSource("    pageContext.setAttribute(" + varReaderName + ", " + tempReaderName + ");");
-            
+
             ctxt.generateJavaSource("}");
-            
+
             //execute the body action
             ctxt.generateBody();
-            
+
             //close the reader
             ctxt.generateJavaSource("java.io.Reader " + tempReaderName2 + " = (java.io.Reader)pageContext.getAttribute(" + varReaderName + ");");
             ctxt.generateJavaSource("if(" + tempReaderName2 + " != null) " + tempReaderName2 + ".close();");
             ctxt.generateJavaSource("pageContext.removeAttribute(" + varReaderName + ",1);");
         }
-        
-        //if the varReader is not specified 
+
+        //if the varReader is not specified
         else{
-            
+
             ctxt.generateJavaSource("pageContext.setAttribute(\"url_without_param\"," + urlName + ");");
             ctxt.generateBody();
             ctxt.generateJavaSource(urlName + " = (String)pageContext.getAttribute(\"url_without_param\");");
@@ -261,37 +261,37 @@ public class Import implements TagPlugin
                 strScope = ctxt.getConstantAttribute("scope");
             }
             int iScope = Util.getScope(strScope);
-            
+
             ctxt.generateJavaSource("String " + tempStringName + " = null;");
-            
+
             ctxt.generateJavaSource("if(" + iauName + "){");
-            
+
             //get the content of the target
             ctxt.generateJavaSource("    java.net.URL " + urlObjName + " = new java.net.URL(" + urlName + ");");
             ctxt.generateJavaSource("    java.net.URLConnection " + ucName + " = " + urlObjName + ".openConnection();");
             ctxt.generateJavaSource("    java.io.InputStream " + inputStreamName + " = " + ucName + ".getInputStream();");
             ctxt.generateJavaSource("    java.io.Reader " + tempReaderName + " = null;");
-            
+
             ctxt.generateJavaSource("    if(" + charSetName + " == null){");
-            ctxt.generateJavaSource("        String " + contentTypeName + " = " 
+            ctxt.generateJavaSource("        String " + contentTypeName + " = "
                     + ucName + ".getContentType();");
             ctxt.generateJavaSource("        if(null != " + contentTypeName + "){");
             ctxt.generateJavaSource("            " + charSetName + " = " +
                     "org.apache.jasper.tagplugins.jstl.Util.getContentTypeAttribute(" + contentTypeName + ", \"charset\");");
-            ctxt.generateJavaSource("            if(" + charSetName + " == null) " 
+            ctxt.generateJavaSource("            if(" + charSetName + " == null) "
                     + charSetName + " = org.apache.jasper.tagplugins.jstl.Util.DEFAULT_ENCODING;");
             ctxt.generateJavaSource("        }else{");
             ctxt.generateJavaSource("            " + charSetName + " = org.apache.jasper.tagplugins.jstl.Util.DEFAULT_ENCODING;");
             ctxt.generateJavaSource("        }");
             ctxt.generateJavaSource("    }");
-            
+
             ctxt.generateJavaSource("    try{");
             ctxt.generateJavaSource("        " + tempReaderName + " = new java.io.InputStreamReader(" + inputStreamName + "," + charSetName + ");");
             ctxt.generateJavaSource("    }catch(Exception ex){");
             //ctxt.generateJavaSource("        throw new JspTagException(ex.toString());");
             ctxt.generateJavaSource("        " + tempReaderName + " = new java.io.InputStreamReader(" + inputStreamName + ",org.apache.jasper.tagplugins.jstl.Util.DEFAULT_ENCODING);");
             ctxt.generateJavaSource("    }");
-            
+
             //validate the response
             ctxt.generateJavaSource("    if(" + ucName + " instanceof java.net.HttpURLConnection){");
             ctxt.generateJavaSource("        int status = ((java.net.HttpURLConnection) " + ucName + ").getResponseCode();");
@@ -299,22 +299,22 @@ public class Import implements TagPlugin
             ctxt.generateJavaSource("            throw new JspTagException(status + \" \" + " + urlName + ");");
             ctxt.generateJavaSource("        }");
             ctxt.generateJavaSource("    }");
-            
+
             ctxt.generateJavaSource("    java.io.BufferedReader " + brName + " =  new java.io.BufferedReader(" + tempReaderName + ");");
             ctxt.generateJavaSource("    StringBuilder " + sbName + " = new StringBuilder();");
             String index = ctxt.getTemporaryVariableName();
             ctxt.generateJavaSource("    int " + index + ";");
             ctxt.generateJavaSource("    while(("+index+" = "+brName+".read()) != -1) "+sbName+".append((char)"+index+");");
             ctxt.generateJavaSource("    " + tempStringName + " = " +sbName + ".toString();");
-            
+
             ctxt.generateJavaSource("}else{");
-            
+
             //if the url is relative, http request is needed.
             ctxt.generateJavaSource("    if (!(pageContext.getRequest() instanceof HttpServletRequest  " +
             "&& pageContext.getResponse() instanceof HttpServletResponse)){");
             ctxt.generateJavaSource("        throw new JspTagException(\"Relative &lt;import&gt; from non-HTTP request not allowed\");");
             ctxt.generateJavaSource("    }");
-            
+
             //get the servlet context of the context defined in the context attribute
             ctxt.generateJavaSource("    ServletContext " + servletContextName + " = null;");
             if(hasContext){
@@ -326,7 +326,7 @@ public class Import implements TagPlugin
             }else{
                 ctxt.generateJavaSource("    " + servletContextName + " = pageContext.getServletContext();");
             }
-            
+
             //
             ctxt.generateJavaSource("    if(" + servletContextName + " == null){");
             if(hasContext){
@@ -335,11 +335,11 @@ public class Import implements TagPlugin
                 ctxt.generateJavaSource("        throw new JspTagException(\"Unable to get RequestDispatcher for URL: \\\" \" +" + urlName + "+ \" \\\". Verify values and/or enable cross context access.\");");
             }
             ctxt.generateJavaSource("    }");
-            
+
             //get the request dispatcher
             ctxt.generateJavaSource("    RequestDispatcher " + requestDispatcherName + " = " + servletContextName + ".getRequestDispatcher(org.apache.jasper.tagplugins.jstl.Util.stripSession("+urlName+"));");
             ctxt.generateJavaSource("    if(" + requestDispatcherName + " == null) throw new JspTagException(org.apache.jasper.tagplugins.jstl.Util.stripSession("+urlName+"));");
-            
+
             //initialize a ImportResponseWrapper to include the resource
             ctxt.generateJavaSource("    org.apache.jasper.tagplugins.jstl.Util.ImportResponseWrapper " + irwName + " = new org.apache.jasper.tagplugins.jstl.Util.ImportResponseWrapper((HttpServletResponse) pageContext.getResponse());");
             ctxt.generateJavaSource("    if(" + charSetName + " == null){");
@@ -359,16 +359,16 @@ public class Import implements TagPlugin
             ctxt.generateJavaSource("        else");
             ctxt.generateJavaSource("            throw new JspException(rc);");
             ctxt.generateJavaSource("    }");
-            
+
             //validate the response status
             ctxt.generateJavaSource("    if(" + irwName + ".getStatus() < 200 || " + irwName + ".getStatus() > 299){");
             ctxt.generateJavaSource("        throw new JspTagException(" + irwName + ".getStatus()+\" \" + org.apache.jasper.tagplugins.jstl.Util.stripSession(" + urlName + "));");
             ctxt.generateJavaSource("    }");
-            
+
             ctxt.generateJavaSource("    " + tempStringName + " = " + irwName + ".getString();");
-            
+
             ctxt.generateJavaSource("}");
-            
+
             if(hasVar){
                 String strVar = ctxt.getConstantAttribute("var");
                 ctxt.generateJavaSource("pageContext.setAttribute(\""+strVar+"\"," + tempStringName + "," + iScope + ");");

Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Otherwise.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Otherwise.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Otherwise.java (original)
+++ tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Otherwise.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,10 +22,10 @@ import org.apache.jasper.compiler.tagplu
 import org.apache.jasper.compiler.tagplugin.TagPluginContext;
 
 public final class Otherwise implements TagPlugin {
-    
+
     @Override
     public void doTag(TagPluginContext ctxt) {
-        
+
         // See When.java for the reason whey "}" is need at the beginng and
         // not at the end.
         ctxt.generateJavaSource("} else {");

Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java (original)
+++ tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,22 +23,22 @@ import org.apache.jasper.compiler.tagplu
 
 
 public final class Out implements TagPlugin {
-    
+
     @Override
     public void doTag(TagPluginContext ctxt) {
-        
-        //these two data member are to indicate 
+
+        //these two data member are to indicate
         //whether the corresponding attribute is specified
         boolean hasDefault=false, hasEscapeXml=false;
         hasDefault = ctxt.isAttributeSpecified("default");
         hasEscapeXml = ctxt.isAttributeSpecified("escapeXml");
-        
-        //strValName, strEscapeXmlName & strDefName are two variables' name 
+
+        //strValName, strEscapeXmlName & strDefName are two variables' name
         //standing for value, escapeXml and default attribute
         String strValName = ctxt.getTemporaryVariableName();
         String strDefName = ctxt.getTemporaryVariableName();
         String strEscapeXmlName = ctxt.getTemporaryVariableName();
-        
+
         //according to the tag file, the value attribute is mandatory.
         ctxt.generateJavaSource("String " + strValName + " = null;");
         ctxt.generateJavaSource("if(");
@@ -48,7 +48,7 @@ public final class Out implements TagPlu
         ctxt.generateAttribute("value");
         ctxt.generateJavaSource(").toString();");
         ctxt.generateJavaSource("}");
-        
+
         //initiate the strDefName with null.
         //if the default has been specified, then assign the value to it;
         ctxt.generateJavaSource("String " + strDefName + " = null;\n");
@@ -61,7 +61,7 @@ public final class Out implements TagPlu
             ctxt.generateJavaSource(").toString();");
             ctxt.generateJavaSource("}");
         }
-        
+
         //initiate the strEscapeXmlName with true;
         //if the escapeXml is specified, assign the value to it;
         ctxt.generateJavaSource("boolean " + strEscapeXmlName + " = true;");
@@ -70,8 +70,8 @@ public final class Out implements TagPlu
             ctxt.generateAttribute("default");
             ctxt.generateJavaSource(").toString());");
         }
-        
-        //main part. 
+
+        //main part.
         ctxt.generateJavaSource("if(null != " + strValName +"){");
         ctxt.generateJavaSource("    if(" + strEscapeXmlName + "){");
         ctxt.generateJavaSource("        " + strValName + " = org.apache.jasper.tagplugins.jstl.Util.escapeXml(" + strValName + ");");
@@ -86,6 +86,6 @@ public final class Out implements TagPlu
         ctxt.generateJavaSource("    }else{");
         ctxt.generateBody();
         ctxt.generateJavaSource("    }");
-        ctxt.generateJavaSource("}");   
+        ctxt.generateJavaSource("}");
     }
 }

Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Param.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Param.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Param.java (original)
+++ tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Param.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,19 +22,19 @@ import org.apache.jasper.compiler.tagplu
 import org.apache.jasper.compiler.tagplugin.TagPluginContext;
 
 public class Param implements TagPlugin {
-    
+
     @Override
     public void doTag(TagPluginContext ctxt) {
-        
+
         //don't support the body content
-        
+
         //define names of all the temp variables
         String nameName = ctxt.getTemporaryVariableName();
         String valueName = ctxt.getTemporaryVariableName();
         String urlName = ctxt.getTemporaryVariableName();
         String encName = ctxt.getTemporaryVariableName();
         String index = ctxt.getTemporaryVariableName();
-        
+
         //if the param tag has no parents, throw a exception
         TagPluginContext parent = ctxt.getParentContext();
         if(parent == null){
@@ -42,16 +42,16 @@ public class Param implements TagPlugin 
             "(\"&lt;param&gt; outside &lt;import&gt; or &lt;urlEncode&gt;\");");
             return;
         }
-        
+
         //get the url string before adding this param
         ctxt.generateJavaSource("String " + urlName + " = " +
         "(String)pageContext.getAttribute(\"url_without_param\");");
-        
+
         //get the value of "name"
         ctxt.generateJavaSource("String " + nameName + " = ");
         ctxt.generateAttribute("name");
         ctxt.generateJavaSource(";");
-        
+
         //if the "name" is null then do nothing.
         //else add such string "name=value" to the url.
         //and the url should be encoded

Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Redirect.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Redirect.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Redirect.java (original)
+++ tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Redirect.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,20 +22,20 @@ import org.apache.jasper.compiler.tagplu
 import org.apache.jasper.compiler.tagplugin.TagPluginContext;
 
 public class Redirect implements TagPlugin {
-    
+
     @Override
     public void doTag(TagPluginContext ctxt) {
-        
+
         //flag for the existence of the "context"
         boolean hasContext = ctxt.isAttributeSpecified("context");
-        
+
         //names of the temp variables
         String urlName = ctxt.getTemporaryVariableName();
         String contextName = ctxt.getTemporaryVariableName();
         String baseUrlName = ctxt.getTemporaryVariableName();
         String resultName = ctxt.getTemporaryVariableName();
         String responseName = ctxt.getTemporaryVariableName();
-        
+
         //get context
         ctxt.generateJavaSource("String " + contextName + " = null;");
         if(hasContext){
@@ -43,36 +43,36 @@ public class Redirect implements TagPlug
             ctxt.generateAttribute("context");
             ctxt.generateJavaSource(";");
         }
-        
+
         //get the url
         ctxt.generateJavaSource("String " + urlName + " = ");
         ctxt.generateAttribute("url");
         ctxt.generateJavaSource(";");
-        
+
         //get the raw url according to "url" and "context"
         ctxt.generateJavaSource("String " + baseUrlName + " = " +
                 "org.apache.jasper.tagplugins.jstl.Util.resolveUrl(" + urlName + ", " + contextName + ", pageContext);");
         ctxt.generateJavaSource("pageContext.setAttribute" +
                 "(\"url_without_param\", " + baseUrlName + ");");
-        
+
         //add params
         ctxt.generateBody();
-        
+
         ctxt.generateJavaSource("String " + resultName + " = " +
         "(String)pageContext.getAttribute(\"url_without_param\");");
         ctxt.generateJavaSource("pageContext.removeAttribute" +
         "(\"url_without_param\");");
-        
+
         //get the response object
         ctxt.generateJavaSource("HttpServletResponse " + responseName + " = " +
         "((HttpServletResponse) pageContext.getResponse());");
-        
+
         //if the url is relative, encode it
         ctxt.generateJavaSource("if(!org.apache.jasper.tagplugins.jstl.Util.isAbsoluteUrl(" + resultName + ")){");
         ctxt.generateJavaSource("    " + resultName + " = "
                 + responseName + ".encodeRedirectURL(" + resultName + ");");
         ctxt.generateJavaSource("}");
-        
+
         //do redirect
         ctxt.generateJavaSource("try{");
         ctxt.generateJavaSource("    " + responseName + ".sendRedirect(" + resultName + ");");
@@ -80,5 +80,5 @@ public class Redirect implements TagPlug
         ctxt.generateJavaSource("    throw new JspTagException(ex.toString(), ex);");
         ctxt.generateJavaSource("}");
     }
-    
+
 }

Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Remove.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Remove.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Remove.java (original)
+++ tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Remove.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,16 +23,16 @@ import org.apache.jasper.compiler.tagplu
 import org.apache.jasper.tagplugins.jstl.Util;
 
 public class Remove implements TagPlugin {
-    
+
     @Override
     public void doTag(TagPluginContext ctxt) {
-        
+
         //scope flag
         boolean hasScope = ctxt.isAttributeSpecified("scope");
-        
+
         //the value of the "var"
         String strVar = ctxt.getConstantAttribute("var");
-        
+
         //remove attribute from certain scope.
         //default scope is "page".
         if(hasScope){
@@ -42,5 +42,5 @@ public class Remove implements TagPlugin
             ctxt.generateJavaSource("pageContext.removeAttribute(\"" + strVar + "\");");
         }
     }
-    
+
 }

Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java (original)
+++ tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,30 +23,30 @@ import org.apache.jasper.compiler.tagplu
 import org.apache.jasper.tagplugins.jstl.Util;
 
 public class Set implements TagPlugin {
-    
+
     @Override
     public void doTag(TagPluginContext ctxt) {
-        
+
         //the flags to indicate whether the attributes have been specified
-        boolean hasValue = false, hasVar = false, hasScope = false, 
+        boolean hasValue = false, hasVar = false, hasScope = false,
         hasTarget = false;
-        
+
         //the scope name
         String strScope;
         //the id of the scope
         int iScope;
-        
+
         //initialize the flags
         hasValue = ctxt.isAttributeSpecified("value");
         hasVar = ctxt.isAttributeSpecified("var");
         hasScope = ctxt.isAttributeSpecified("scope");
         hasTarget = ctxt.isAttributeSpecified("target");
-        
+
         //the temp variables name
         String resultName = ctxt.getTemporaryVariableName();
         String targetName = ctxt.getTemporaryVariableName();
         String propertyName = ctxt.getTemporaryVariableName();
-        
+
         //initialize the "result" which will be assigned to the var or target.property
         ctxt.generateJavaSource("Object " + resultName + " = null;");
         if(hasValue){
@@ -57,17 +57,17 @@ public class Set implements TagPlugin {
             ctxt.dontUseTagPlugin();
             return;
         }
-        
+
         //initialize the strScope
         if(hasScope){
             strScope = ctxt.getConstantAttribute("scope");
         }else{
             strScope = "page";
         }
-        
+
         //get the iScope according to the strScope
         iScope = Util.getScope(strScope);
-        
+
         //if the attribute var has been specified then assign the result to the var;
         if(hasVar){
             String strVar = ctxt.getConstantAttribute("var");
@@ -80,16 +80,16 @@ public class Set implements TagPlugin {
                 ctxt.generateJavaSource("    pageContext.removeAttribute(\"" + strVar + "\");");
             }
             ctxt.generateJavaSource("}");
-            
+
             //else assign the result to the target.property
         }else if(hasTarget){
-            
+
             //generate the temp variable name
             String pdName = ctxt.getTemporaryVariableName();
             String successFlagName = ctxt.getTemporaryVariableName();
             String index = ctxt.getTemporaryVariableName();
             String methodName = ctxt.getTemporaryVariableName();
-            
+
             //initialize the property
             ctxt.generateJavaSource("String " + propertyName + " = null;");
             ctxt.generateJavaSource("if(");
@@ -99,15 +99,15 @@ public class Set implements TagPlugin {
             ctxt.generateAttribute("property");
             ctxt.generateJavaSource(").toString();");
             ctxt.generateJavaSource("}");
-            
+
             //initialize the target
             ctxt.generateJavaSource("Object " + targetName + " = ");
             ctxt.generateAttribute("target");
             ctxt.generateJavaSource(";");
-            
+
             //the target is ok
             ctxt.generateJavaSource("if(" + targetName + " != null){");
-            
+
             //if the target is a map, then put the result into the map with the key property
             ctxt.generateJavaSource("    if(" + targetName + " instanceof java.util.Map){");
             ctxt.generateJavaSource("        if(null != " + resultName + "){");
@@ -115,27 +115,27 @@ public class Set implements TagPlugin {
             ctxt.generateJavaSource("        }else{");
             ctxt.generateJavaSource("            ((java.util.Map) " + targetName + ").remove(" + propertyName + ");");
             ctxt.generateJavaSource("        }");
-            
+
             //else assign the result to the target.property
             ctxt.generateJavaSource("    }else{");
             ctxt.generateJavaSource("        try{");
-            
+
             //get all the property of the target
             ctxt.generateJavaSource("            java.beans.PropertyDescriptor " + pdName + "[] = java.beans.Introspector.getBeanInfo(" + targetName + ".getClass()).getPropertyDescriptors();");
-            
+
             //the success flag is to imply whether the assign is successful
             ctxt.generateJavaSource("            boolean " + successFlagName + " = false;");
-            
+
             //find the right property
             ctxt.generateJavaSource("            for(int " + index + "=0;" + index + "<" + pdName + ".length;" + index + "++){");
             ctxt.generateJavaSource("                if(" + pdName + "[" + index + "].getName().equals(" + propertyName + ")){");
-            
+
             //get the "set" method;
             ctxt.generateJavaSource("                    java.lang.reflect.Method " + methodName + " = " + pdName + "[" + index + "].getWriteMethod();");
             ctxt.generateJavaSource("                    if(null == " + methodName + "){");
             ctxt.generateJavaSource("                        throw new JspException(\"No setter method in &lt;set&gt; for property \"+" + propertyName + ");");
             ctxt.generateJavaSource("                    }");
-            
+
             //invoke the method through the reflection
             ctxt.generateJavaSource("                    if(" + resultName + " != null){");
             ctxt.generateJavaSource("                        " + methodName + ".invoke(" + targetName + ", new Object[]{(" + methodName + ".getParameterTypes()[0]).cast(" + resultName + ")});");
@@ -149,7 +149,7 @@ public class Set implements TagPlugin {
             ctxt.generateJavaSource("                throw new JspException(\"Invalid property in &lt;set&gt;:\"+" + propertyName + ");");
             ctxt.generateJavaSource("            }");
             ctxt.generateJavaSource("        }");
-            
+
             //catch the el exception and throw it as a JspException
             ctxt.generateJavaSource("        catch (IllegalAccessException ex) {");
             ctxt.generateJavaSource("            throw new JspException(ex);");
@@ -164,5 +164,5 @@ public class Set implements TagPlugin {
             ctxt.generateJavaSource("}");
         }
     }
-    
+
 }

Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Url.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Url.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Url.java (original)
+++ tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Url.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,37 +23,37 @@ import org.apache.jasper.compiler.tagplu
 import org.apache.jasper.tagplugins.jstl.Util;
 
 public class Url implements TagPlugin {
-    
+
     @Override
     public void doTag(TagPluginContext ctxt) {
-        
+
         //flags
         boolean hasVar, hasContext, hasScope;
-        
+
         //init flags
         hasVar = ctxt.isAttributeSpecified("var");
         hasContext = ctxt.isAttributeSpecified("context");
         hasScope = ctxt.isAttributeSpecified("scope");
-        
+
         //define name of the temp variables
         String valueName = ctxt.getTemporaryVariableName();
         String contextName = ctxt.getTemporaryVariableName();
         String baseUrlName = ctxt.getTemporaryVariableName();
         String resultName = ctxt.getTemporaryVariableName();
         String responseName = ctxt.getTemporaryVariableName();
-        
+
         //get the scope
         String strScope = "page";
         if(hasScope){
             strScope = ctxt.getConstantAttribute("scope");
         }
         int iScope = Util.getScope(strScope);
-        
+
         //get the value
         ctxt.generateJavaSource("String " + valueName + " = ");
         ctxt.generateAttribute("value");
         ctxt.generateJavaSource(";");
-        
+
         //get the context
         ctxt.generateJavaSource("String " + contextName + " = null;");
         if(hasContext){
@@ -61,20 +61,20 @@ public class Url implements TagPlugin {
             ctxt.generateAttribute("context");
             ctxt.generateJavaSource(";");
         }
-        
+
         //get the raw url
         ctxt.generateJavaSource("String " + baseUrlName + " = " +
                 "org.apache.jasper.tagplugins.jstl.Util.resolveUrl(" + valueName + ", " + contextName + ", pageContext);");
         ctxt.generateJavaSource("pageContext.setAttribute" +
                 "(\"url_without_param\", " + baseUrlName + ");");
-        
+
         //add params
         ctxt.generateBody();
-        
+
         ctxt.generateJavaSource("String " + resultName + " = " +
         "(String)pageContext.getAttribute(\"url_without_param\");");
         ctxt.generateJavaSource("pageContext.removeAttribute(\"url_without_param\");");
-        
+
         //if the url is relative, encode it
         ctxt.generateJavaSource("if(!org.apache.jasper.tagplugins.jstl.Util.isAbsoluteUrl(" + resultName + ")){");
         ctxt.generateJavaSource("    HttpServletResponse " + responseName + " = " +
@@ -82,13 +82,13 @@ public class Url implements TagPlugin {
         ctxt.generateJavaSource("    " + resultName + " = "
                 + responseName + ".encodeURL(" + resultName + ");");
         ctxt.generateJavaSource("}");
-        
+
         //if "var" is specified, the url string store in the attribute var defines
         if(hasVar){
             String strVar = ctxt.getConstantAttribute("var");
             ctxt.generateJavaSource("pageContext.setAttribute" +
                     "(\"" + strVar + "\", " + resultName + ", " + iScope + ");");
-            
+
             //if var is not specified, just print out the url string
         }else{
             ctxt.generateJavaSource("try{");
@@ -98,5 +98,5 @@ public class Url implements TagPlugin {
             ctxt.generateJavaSource("}");
         }
     }
-    
+
 }

Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/When.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/When.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/When.java (original)
+++ tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/When.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,7 +22,7 @@ import org.apache.jasper.compiler.tagplu
 import org.apache.jasper.compiler.tagplugin.TagPluginContext;
 
 public final class When implements TagPlugin {
-    
+
     @Override
     public void doTag(TagPluginContext ctxt) {
         // Get the parent context to determine if this is the first <c:when>
@@ -31,7 +31,7 @@ public final class When implements TagPl
             ctxt.dontUseTagPlugin();
             return;
         }
-        
+
         if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) {
             ctxt.generateJavaSource("} else if(");
             // See comment below for the reason we generate the extra "}" here.
@@ -43,7 +43,7 @@ public final class When implements TagPl
         ctxt.generateAttribute("test");
         ctxt.generateJavaSource("){");
         ctxt.generateBody();
-        
+
         // We don't generate the closing "}" for the "if" here because there
         // may be whitespaces in between <c:when>'s.  Instead we delay
         // generating it until the next <c:when> or <c:otherwise> or

Modified: tomcat/trunk/java/org/apache/jasper/util/Enumerator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/util/Enumerator.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/util/Enumerator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/util/Enumerator.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -73,7 +73,7 @@ public final class Enumerator<T> impleme
             while (iterator.hasNext()) {
                 list.add(iterator.next());
             }
-            this.iterator = list.iterator();   
+            this.iterator = list.iterator();
         }
 
     }

Modified: tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java (original)
+++ tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,9 +20,9 @@ package org.apache.jasper.util;
  * Utilities for handling Throwables and Exceptions.
  */
 public class ExceptionUtils {
-    
+
     /**
-     * Checks whether the supplied Throwable is one that needs to be 
+     * Checks whether the supplied Throwable is one that needs to be
      * rethrown and swallows all others.
      * @param t the Throwable to check
      */

Modified: tomcat/trunk/java/org/apache/jasper/util/UniqueAttributesImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/util/UniqueAttributesImpl.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/util/UniqueAttributesImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/util/UniqueAttributesImpl.java Sat Oct 22 21:18:03 2011
@@ -31,7 +31,7 @@ public class UniqueAttributesImpl extend
 
     private static final String IMPORT = "import";
     private static final String PAGE_ENCODING = "pageEncoding";
-    
+
     private final boolean pageDirective;
     private final Set<String> qNames = new HashSet<String>();
 

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -47,8 +47,8 @@ public class ASCIIReader extends Reader 
     // Constructors
     //
 
-    /** 
-     * Constructs an ASCII reader from the specified input stream 
+    /**
+     * Constructs an ASCII reader from the specified input stream
      * and buffer size.
      *
      * @param inputStream The input stream.

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/EncodingMap.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/EncodingMap.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/EncodingMap.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/EncodingMap.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,7 +28,7 @@ package org.apache.jasper.xmlparser;
 import java.util.Hashtable;
 
 /**
- * EncodingMap is a convenience class which handles conversions between 
+ * EncodingMap is a convenience class which handles conversions between
  * IANA encoding names and Java encoding names, and vice versa. The
  * encoding names used in XML instance documents <strong>must</strong>
  * be the IANA encoding names specified or one of the aliases for those names
@@ -470,7 +470,7 @@ import java.util.Hashtable;
  *      </TD>
  *  </TR>
  * </TABLE>
- * 
+ *
  * @author TAMURA Kent, IBM
  * @author Andy Clark, IBM
  *
@@ -556,7 +556,7 @@ public class EncodingMap {
         fIANA2JavaMap.put("CP500",    "CP500");
         fIANA2JavaMap.put("CSIBM500",    "CP500");
         fIANA2JavaMap.put("EBCDIC-CP-CH",    "CP500");
-        fIANA2JavaMap.put("EBCDIC-CP-BE",    "CP500"); 
+        fIANA2JavaMap.put("EBCDIC-CP-BE",    "CP500");
         fIANA2JavaMap.put("IBM775",    "CP775");
         fIANA2JavaMap.put("CP775",    "CP775");
         fIANA2JavaMap.put("CSPC775BALTIC",    "CP775");
@@ -717,7 +717,7 @@ public class EncodingMap {
         fIANA2JavaMap.put("WINDOWS-1258",   "Cp1258");
         fIANA2JavaMap.put("TIS-620",   "TIS620");
 
-        fIANA2JavaMap.put("ISO-8859-1",      "ISO8859_1"); 
+        fIANA2JavaMap.put("ISO-8859-1",      "ISO8859_1");
         fIANA2JavaMap.put("ISO-IR-100",      "ISO8859_1");
         fIANA2JavaMap.put("ISO_8859-1",      "ISO8859_1");
         fIANA2JavaMap.put("LATIN1",      "ISO8859_1");
@@ -726,34 +726,34 @@ public class EncodingMap {
         fIANA2JavaMap.put("IBM819",      "ISO8859_1");
         fIANA2JavaMap.put("CP819",      "ISO8859_1");
 
-        fIANA2JavaMap.put("ISO-8859-2",      "ISO8859_2"); 
+        fIANA2JavaMap.put("ISO-8859-2",      "ISO8859_2");
         fIANA2JavaMap.put("ISO-IR-101",      "ISO8859_2");
         fIANA2JavaMap.put("ISO_8859-2",      "ISO8859_2");
         fIANA2JavaMap.put("LATIN2",      "ISO8859_2");
         fIANA2JavaMap.put("CSISOLATIN2",      "ISO8859_2");
         fIANA2JavaMap.put("L2",      "ISO8859_2");
 
-        fIANA2JavaMap.put("ISO-8859-3",      "ISO8859_3"); 
+        fIANA2JavaMap.put("ISO-8859-3",      "ISO8859_3");
         fIANA2JavaMap.put("ISO-IR-109",      "ISO8859_3");
         fIANA2JavaMap.put("ISO_8859-3",      "ISO8859_3");
         fIANA2JavaMap.put("LATIN3",      "ISO8859_3");
         fIANA2JavaMap.put("CSISOLATIN3",      "ISO8859_3");
         fIANA2JavaMap.put("L3",      "ISO8859_3");
 
-        fIANA2JavaMap.put("ISO-8859-4",      "ISO8859_4"); 
+        fIANA2JavaMap.put("ISO-8859-4",      "ISO8859_4");
         fIANA2JavaMap.put("ISO-IR-110",      "ISO8859_4");
         fIANA2JavaMap.put("ISO_8859-4",      "ISO8859_4");
         fIANA2JavaMap.put("LATIN4",      "ISO8859_4");
         fIANA2JavaMap.put("CSISOLATIN4",      "ISO8859_4");
         fIANA2JavaMap.put("L4",      "ISO8859_4");
 
-        fIANA2JavaMap.put("ISO-8859-5",      "ISO8859_5"); 
+        fIANA2JavaMap.put("ISO-8859-5",      "ISO8859_5");
         fIANA2JavaMap.put("ISO-IR-144",      "ISO8859_5");
         fIANA2JavaMap.put("ISO_8859-5",      "ISO8859_5");
         fIANA2JavaMap.put("CYRILLIC",      "ISO8859_5");
         fIANA2JavaMap.put("CSISOLATINCYRILLIC",      "ISO8859_5");
 
-        fIANA2JavaMap.put("ISO-8859-6",      "ISO8859_6"); 
+        fIANA2JavaMap.put("ISO-8859-6",      "ISO8859_6");
         fIANA2JavaMap.put("ISO-IR-127",      "ISO8859_6");
         fIANA2JavaMap.put("ISO_8859-6",      "ISO8859_6");
         fIANA2JavaMap.put("ECMA-114",      "ISO8859_6");
@@ -761,7 +761,7 @@ public class EncodingMap {
         fIANA2JavaMap.put("ARABIC",      "ISO8859_6");
         fIANA2JavaMap.put("CSISOLATINARABIC",      "ISO8859_6");
 
-        fIANA2JavaMap.put("ISO-8859-7",      "ISO8859_7"); 
+        fIANA2JavaMap.put("ISO-8859-7",      "ISO8859_7");
         fIANA2JavaMap.put("ISO-IR-126",      "ISO8859_7");
         fIANA2JavaMap.put("ISO_8859-7",      "ISO8859_7");
         fIANA2JavaMap.put("ELOT_928",      "ISO8859_7");
@@ -770,29 +770,29 @@ public class EncodingMap {
         fIANA2JavaMap.put("CSISOLATINGREEK",      "ISO8859_7");
         fIANA2JavaMap.put("GREEK8",      "ISO8859_7");
 
-        fIANA2JavaMap.put("ISO-8859-8",      "ISO8859_8"); 
-        fIANA2JavaMap.put("ISO-8859-8-I",      "ISO8859_8"); // added since this encoding only differs w.r.t. presentation 
+        fIANA2JavaMap.put("ISO-8859-8",      "ISO8859_8");
+        fIANA2JavaMap.put("ISO-8859-8-I",      "ISO8859_8"); // added since this encoding only differs w.r.t. presentation
         fIANA2JavaMap.put("ISO-IR-138",      "ISO8859_8");
         fIANA2JavaMap.put("ISO_8859-8",      "ISO8859_8");
         fIANA2JavaMap.put("HEBREW",      "ISO8859_8");
         fIANA2JavaMap.put("CSISOLATINHEBREW",      "ISO8859_8");
 
-        fIANA2JavaMap.put("ISO-8859-9",      "ISO8859_9"); 
+        fIANA2JavaMap.put("ISO-8859-9",      "ISO8859_9");
         fIANA2JavaMap.put("ISO-IR-148",      "ISO8859_9");
         fIANA2JavaMap.put("ISO_8859-9",      "ISO8859_9");
         fIANA2JavaMap.put("LATIN5",      "ISO8859_9");
         fIANA2JavaMap.put("CSISOLATIN5",      "ISO8859_9");
         fIANA2JavaMap.put("L5",      "ISO8859_9");
 
-        fIANA2JavaMap.put("ISO-8859-13",      "ISO8859_13"); 
-        
-        fIANA2JavaMap.put("ISO-8859-15",      "ISO8859_15_FDIS"); 
+        fIANA2JavaMap.put("ISO-8859-13",      "ISO8859_13");
+
+        fIANA2JavaMap.put("ISO-8859-15",      "ISO8859_15_FDIS");
         fIANA2JavaMap.put("ISO_8859-15",      "ISO8859_15_FDIS");
-        fIANA2JavaMap.put("LATIN-9",          "ISO8859_15_FDIS"); 
+        fIANA2JavaMap.put("LATIN-9",          "ISO8859_15_FDIS");
 
         fIANA2JavaMap.put("KOI8-R",          "KOI8_R");
         fIANA2JavaMap.put("CSKOI8R",          "KOI8_R");
-        fIANA2JavaMap.put("US-ASCII",        "ASCII"); 
+        fIANA2JavaMap.put("US-ASCII",        "ASCII");
         fIANA2JavaMap.put("ISO-IR-6",        "ASCII");
         fIANA2JavaMap.put("ANSI_X3.4-1968",        "ASCII");
         fIANA2JavaMap.put("ANSI_X3.4-1986",        "ASCII");
@@ -808,8 +808,8 @@ public class EncodingMap {
         fIANA2JavaMap.put("UTF-16BE",           "UnicodeBig");
         fIANA2JavaMap.put("UTF-16LE",           "UnicodeLittle");
 
-        // support for 1047, as proposed to be added to the 
-        // IANA registry in 
+        // support for 1047, as proposed to be added to the
+        // IANA registry in
         // http://lists.w3.org/Archives/Public/ietf-charset/2002JulSep/0049.html
         fIANA2JavaMap.put("IBM-1047",    "Cp1047");
         fIANA2JavaMap.put("IBM1047",    "Cp1047");
@@ -866,7 +866,7 @@ public class EncodingMap {
         // REVISIT:
         //   j:CNS11643 -> EUC-TW?
         //   ISO-2022-CN? ISO-2022-CN-EXT?
-                                                
+
         // add Java to IANA encoding mappings
         //fJava2IANAMap.put("8859_1",    "US-ASCII"); // ?
         fJava2IANAMap.put("ISO8859_1",    "ISO-8859-1");
@@ -963,18 +963,18 @@ public class EncodingMap {
 
     /**
      * Adds an IANA to Java encoding name mapping.
-     * 
+     *
      * @param ianaEncoding The IANA encoding name.
      * @param javaEncoding The Java encoding name.
      */
-    public static void putIANA2JavaMapping(String ianaEncoding, 
+    public static void putIANA2JavaMapping(String ianaEncoding,
                                            String javaEncoding) {
         fIANA2JavaMap.put(ianaEncoding, javaEncoding);
     }
 
     /**
      * Returns the Java encoding name for the specified IANA encoding name.
-     * 
+     *
      * @param ianaEncoding The IANA encoding name.
      */
     public static String getIANA2JavaMapping(String ianaEncoding) {
@@ -983,7 +983,7 @@ public class EncodingMap {
 
     /**
      * Removes an IANA to Java encoding name mapping.
-     * 
+     *
      * @param ianaEncoding The IANA encoding name.
      */
     public static String removeIANA2JavaMapping(String ianaEncoding) {
@@ -992,18 +992,18 @@ public class EncodingMap {
 
     /**
      * Adds a Java to IANA encoding name mapping.
-     * 
+     *
      * @param javaEncoding The Java encoding name.
      * @param ianaEncoding The IANA encoding name.
      */
-    public static void putJava2IANAMapping(String javaEncoding, 
+    public static void putJava2IANAMapping(String javaEncoding,
                                            String ianaEncoding) {
         fJava2IANAMap.put(javaEncoding, ianaEncoding);
     }
 
     /**
      * Returns the IANA encoding name for the specified Java encoding name.
-     * 
+     *
      * @param javaEncoding The Java encoding name.
      */
     public static String getJava2IANAMapping(String javaEncoding) {
@@ -1012,7 +1012,7 @@ public class EncodingMap {
 
     /**
      * Removes a Java to IANA encoding name mapping.
-     * 
+     *
      * @param javaEncoding The Java encoding name.
      */
     public static String removeJava2IANAMapping(String javaEncoding) {

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/ParserUtils.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/ParserUtils.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/ParserUtils.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/ParserUtils.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -180,7 +180,7 @@ public class ParserUtils {
                 }
             }
         }
-        
+
         // Return the completed TreeNode graph
         return (treeNode);
     }

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/SymbolTable.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/SymbolTable.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/SymbolTable.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/SymbolTable.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/TreeNode.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/TreeNode.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/TreeNode.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/TreeNode.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -151,7 +151,7 @@ public class TreeNode {
     public Iterator<String> findAttributes() {
 
         if (attributes == null) {
-            List<String> empty = Collections.emptyList(); 
+            List<String> empty = Collections.emptyList();
             return empty.iterator();
         } else
             return attributes.keySet().iterator();
@@ -187,7 +187,7 @@ public class TreeNode {
     public Iterator<TreeNode> findChildren() {
 
         if (children == null) {
-            List<TreeNode> empty = Collections.emptyList(); 
+            List<TreeNode> empty = Collections.emptyList();
             return empty.iterator();
         } else
             return children.iterator();
@@ -205,9 +205,9 @@ public class TreeNode {
     public Iterator<TreeNode> findChildren(String name) {
 
         if (children == null) {
-            List<TreeNode> empty = Collections.emptyList(); 
+            List<TreeNode> empty = Collections.emptyList();
             return empty.iterator();
-        } 
+        }
 
         ArrayList<TreeNode> results = new ArrayList<TreeNode>();
         Iterator<TreeNode> items = children.iterator();

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/UCSReader.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/UCSReader.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/UCSReader.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/UCSReader.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.Reader;
 
-/** 
+/**
  * Reader for UCS-2 and UCS-4 encodings.
  * (i.e., encodings from ISO-10646-UCS-(2|4)).
  *
@@ -33,14 +33,14 @@ public class UCSReader extends Reader {
 
     private final org.apache.juli.logging.Log log=
         org.apache.juli.logging.LogFactory.getLog( UCSReader.class );
-    
+
     //
     // Constants
     //
 
     /** Default byte buffer size (8192, larger than that of ASCIIReader
      * since it's reasonable to surmise that the average UCS-4-encoded
-     * file should be 4 times as large as the average ASCII-encoded file). 
+     * file should be 4 times as large as the average ASCII-encoded file).
      */
     public static final int DEFAULT_BUFFER_SIZE = 8192;
 
@@ -66,8 +66,8 @@ public class UCSReader extends Reader {
     // Constructors
     //
 
-    /** 
-     * Constructs an ASCII reader from the specified input stream 
+    /**
+     * Constructs an ASCII reader from the specified input stream
      * using the default buffer size.  The Endian-ness and whether this is
      * UCS-2 or UCS-4 needs also to be known in advance.
      *
@@ -78,8 +78,8 @@ public class UCSReader extends Reader {
         this(inputStream, DEFAULT_BUFFER_SIZE, encoding);
     } // <init>(InputStream, short)
 
-    /** 
-     * Constructs an ASCII reader from the specified input stream 
+    /**
+     * Constructs an ASCII reader from the specified input stream
      * and buffer size.  The Endian-ness and whether this is
      * UCS-2 or UCS-4 needs also to be known in advance.
      *
@@ -111,7 +111,7 @@ public class UCSReader extends Reader {
      * @exception  IOException  If an I/O error occurs
      */
     @Override
-    public int read() throws IOException { 
+    public int read() throws IOException {
         int b0 = fInputStream.read() & 0xff;
         if (b0 == 0xff)
             return -1;
@@ -172,7 +172,7 @@ public class UCSReader extends Reader {
                         fBuffer[count+j] = 0;
                     break;
                 } else {
-                    fBuffer[count+i] = (byte)charRead; 
+                    fBuffer[count+i] = (byte)charRead;
                 }
             }
             count += numToRead;

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/UTF8Reader.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/UTF8Reader.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/UTF8Reader.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/UTF8Reader.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,7 +34,7 @@ public class UTF8Reader
 
     private final org.apache.juli.logging.Log log=
         org.apache.juli.logging.LogFactory.getLog( UTF8Reader.class );
-    
+
     // debugging
 
     /** Debug read. */
@@ -60,8 +60,8 @@ public class UTF8Reader
     // Constructors
     //
 
-    /** 
-     * Constructs a UTF-8 reader from the specified input stream, 
+    /**
+     * Constructs a UTF-8 reader from the specified input stream,
      * buffer size and MessageFormatter.
      *
      * @param inputStream The input stream.
@@ -100,7 +100,7 @@ public class UTF8Reader
             int index = 0;
 
             // get first byte
-            int b0 = index == fOffset 
+            int b0 = index == fOffset
                    ? fInputStream.read() : fBuffer[index++] & 0x00FF;
             if (b0 == -1) {
                 return -1;
@@ -115,7 +115,7 @@ public class UTF8Reader
             // UTF-8:   [110y yyyy] [10xx xxxx]
             // Unicode: [0000 0yyy] [yyxx xxxx]
             else if ((b0 & 0xE0) == 0xC0) {
-                int b1 = index == fOffset 
+                int b1 = index == fOffset
                        ? fInputStream.read() : fBuffer[index++] & 0x00FF;
                 if (b1 == -1) {
                     expectedByte(2, 2);
@@ -137,7 +137,7 @@ public class UTF8Reader
                 if ((b1 & 0xC0) != 0x80) {
                     invalidByte(2, 3);
                 }
-                int b2 = index == fOffset 
+                int b2 = index == fOffset
                        ? fInputStream.read() : fBuffer[index++] & 0x00FF;
                 if (b2 == -1) {
                     expectedByte(3, 3);
@@ -154,7 +154,7 @@ public class UTF8Reader
             //          [1101 11yy] [yyxx xxxx] (low surrogate)
             //          * uuuuu = wwww + 1
             else if ((b0 & 0xF8) == 0xF0) {
-                int b1 = index == fOffset 
+                int b1 = index == fOffset
                        ? fInputStream.read() : fBuffer[index++] & 0x00FF;
                 if (b1 == -1) {
                     expectedByte(2, 4);
@@ -162,7 +162,7 @@ public class UTF8Reader
                 if ((b1 & 0xC0) != 0x80) {
                     invalidByte(2, 3);
                 }
-                int b2 = index == fOffset 
+                int b2 = index == fOffset
                        ? fInputStream.read() : fBuffer[index++] & 0x00FF;
                 if (b2 == -1) {
                     expectedByte(3, 4);
@@ -170,7 +170,7 @@ public class UTF8Reader
                 if ((b2 & 0xC0) != 0x80) {
                     invalidByte(3, 3);
                 }
-                int b3 = index == fOffset 
+                int b3 = index == fOffset
                        ? fInputStream.read() : fBuffer[index++] & 0x00FF;
                 if (b3 == -1) {
                     expectedByte(4, 4);
@@ -183,8 +183,8 @@ public class UTF8Reader
                     invalidSurrogate(uuuuu);
                 }
                 int wwww = uuuuu - 1;
-                int hs = 0xD800 | 
-                         ((wwww << 6) & 0x03C0) | ((b1 << 2) & 0x003C) | 
+                int hs = 0xD800 |
+                         ((wwww << 6) & 0x03C0) | ((b1 << 2) & 0x003C) |
                          ((b2 >> 4) & 0x0003);
                 int ls = 0xDC00 | ((b2 << 6) & 0x03C0) | (b3 & 0x003F);
                 c = hs;
@@ -256,7 +256,7 @@ public class UTF8Reader
         // skip read; last character was in error
         // NOTE: Having an offset value other than zero means that there was
         //       an error in the last character read. In this case, we have
-        //       skipped the read so we don't consume any bytes past the 
+        //       skipped the read so we don't consume any bytes past the
         //       error. By signaling the error on the next block read we
         //       allow the method to return the most valid characters that
         //       it can on the previous block read. -Ac
@@ -281,8 +281,8 @@ public class UTF8Reader
             // Unicode: [0000 0yyy] [yyxx xxxx]
             if ((b0 & 0xE0) == 0xC0) {
                 int b1 = -1;
-                if (++in < total) { 
-                    b1 = fBuffer[in] & 0x00FF; 
+                if (++in < total) {
+                    b1 = fBuffer[in] & 0x00FF;
                 }
                 else {
                     b1 = fInputStream.read();
@@ -315,8 +315,8 @@ public class UTF8Reader
             // Unicode: [zzzz yyyy] [yyxx xxxx]
             if ((b0 & 0xF0) == 0xE0) {
                 int b1 = -1;
-                if (++in < total) { 
-                    b1 = fBuffer[in] & 0x00FF; 
+                if (++in < total) {
+                    b1 = fBuffer[in] & 0x00FF;
                 }
                 else {
                     b1 = fInputStream.read();
@@ -340,8 +340,8 @@ public class UTF8Reader
                     invalidByte(2, 3);
                 }
                 int b2 = -1;
-                if (++in < total) { 
-                    b2 = fBuffer[in] & 0x00FF; 
+                if (++in < total) {
+                    b2 = fBuffer[in] & 0x00FF;
                 }
                 else {
                     b2 = fInputStream.read();
@@ -379,8 +379,8 @@ public class UTF8Reader
             //          * uuuuu = wwww + 1
             if ((b0 & 0xF8) == 0xF0) {
                 int b1 = -1;
-                if (++in < total) { 
-                    b1 = fBuffer[in] & 0x00FF; 
+                if (++in < total) {
+                    b1 = fBuffer[in] & 0x00FF;
                 }
                 else {
                     b1 = fInputStream.read();
@@ -404,8 +404,8 @@ public class UTF8Reader
                     invalidByte(2, 4);
                 }
                 int b2 = -1;
-                if (++in < total) { 
-                    b2 = fBuffer[in] & 0x00FF; 
+                if (++in < total) {
+                    b2 = fBuffer[in] & 0x00FF;
                 }
                 else {
                     b2 = fInputStream.read();
@@ -431,8 +431,8 @@ public class UTF8Reader
                     invalidByte(3, 4);
                 }
                 int b3 = -1;
-                if (++in < total) { 
-                    b3 = fBuffer[in] & 0x00FF; 
+                if (++in < total) {
+                    b3 = fBuffer[in] & 0x00FF;
                 }
                 else {
                     b3 = fInputStream.read();
@@ -617,7 +617,7 @@ public class UTF8Reader
     }
 
     /** Throws an exception for invalid byte. */
-    private void invalidByte(int position, int count) 
+    private void invalidByte(int position, int count)
         throws UTFDataFormatException {
 
         throw new UTFDataFormatException(
@@ -628,7 +628,7 @@ public class UTF8Reader
 
     /** Throws an exception for invalid surrogate bits. */
     private void invalidSurrogate(int uuuuu) throws UTFDataFormatException {
-        
+
         throw new UTFDataFormatException(
                 Localizer.getMessage("jsp.error.xml.invalidHighSurrogate",
                                      Integer.toHexString(uuuuu)));

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/XMLChar.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/XMLChar.java?rev=1187803&r1=1187802&r2=1187803&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/XMLChar.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/XMLChar.java Sat Oct 22 21:18:03 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -74,10 +74,10 @@ public class XMLChar {
 
     /** Pubid character mask. */
     public static final int MASK_PUBID = 0x10;
-    
-    /** 
+
+    /**
      * Content character mask. Special characters are those that can
-     * be considered the start of markup, such as '&lt;' and '&amp;'. 
+     * be considered the start of markup, such as '&lt;' and '&amp;'.
      * The various newline characters are considered special as well.
      * All other valid XML characters can be considered content.
      * <p>
@@ -96,10 +96,10 @@ public class XMLChar {
     //
 
     static {
-        
+
         // Initializing the Character Flag Array
         // Code generated by: XMLCharGenerator.
-        
+
         CHARS[9] = 35;
         CHARS[10] = 19;
         CHARS[13] = 19;
@@ -916,7 +916,7 @@ public class XMLChar {
         }
         return true;
     } // isValidName(String):boolean
-    
+
 
     /*
      * from the namespace rec
@@ -952,7 +952,7 @@ public class XMLChar {
      * in the XML 1.0 Recommendation
      *
      * @param nmtoken string to check
-     * @return true if nmtoken is a valid Nmtoken 
+     * @return true if nmtoken is a valid Nmtoken
      */
     public static boolean isValidNmtoken(String nmtoken) {
         if (nmtoken.length() == 0)



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


Mime
View raw message