You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2024/11/29 17:28:18 UTC

(tomcat) branch main updated (d14f2021ff -> 1172ed5d6a)

This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


    from d14f2021ff Remove out-dated references - e.g. to admin app
     new 2c5d078642 Prepare for automated formatting
     new 1172ed5d6a Code clean-up - formatting. No functional change.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/jasper/compiler/Generator.java     | 870 ++++++++-------------
 .../jasper/compiler/ImplicitTagLibraryInfo.java    |  47 +-
 java/org/apache/jasper/compiler/JDTCompiler.java   | 365 ++++-----
 .../apache/jasper/compiler/JarScannerFactory.java  |  12 +-
 java/org/apache/jasper/compiler/JasperTagInfo.java |  29 +-
 .../apache/jasper/compiler/JavacErrorDetail.java   |  75 +-
 java/org/apache/jasper/compiler/JspConfig.java     | 156 ++--
 .../apache/jasper/compiler/JspDocumentParser.java  | 779 +++++-------------
 8 files changed, 824 insertions(+), 1509 deletions(-)


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


(tomcat) 02/02: Code clean-up - formatting. No functional change.

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 1172ed5d6a1c23a07e9c45678bfb28c20279d38f
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Nov 29 17:28:03 2024 +0000

    Code clean-up - formatting. No functional change.
---
 java/org/apache/jasper/compiler/Generator.java     | 840 ++++++++-------------
 .../jasper/compiler/ImplicitTagLibraryInfo.java    |  47 +-
 java/org/apache/jasper/compiler/JDTCompiler.java   | 365 +++++----
 .../apache/jasper/compiler/JarScannerFactory.java  |  12 +-
 java/org/apache/jasper/compiler/JasperTagInfo.java |  29 +-
 .../apache/jasper/compiler/JavacErrorDetail.java   |  75 +-
 java/org/apache/jasper/compiler/JspConfig.java     | 156 ++--
 .../apache/jasper/compiler/JspDocumentParser.java  | 780 +++++--------------
 8 files changed, 816 insertions(+), 1488 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java
index 12784a46b7..4eb9deb893 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -104,8 +104,8 @@ class Generator {
     private final StringInterpreter stringInterpreter;
 
     /**
-     * @param s
-     *            the input string
+     * @param s the input string
+     *
      * @return quoted and escaped string, per Java rule
      */
     static String quote(String s) {
@@ -118,7 +118,7 @@ class Generator {
     }
 
     /**
-     * @param s     the input string - must not be {@code null}
+     * @param s the input string - must not be {@code null}
      *
      * @return escaped string, per Java rule
      */
@@ -178,8 +178,7 @@ class Generator {
     }
 
     /**
-     * Generates declarations. This includes "info" of the page directive, and
-     * scriptlet declarations.
+     * Generates declarations. This includes "info" of the page directive, and scriptlet declarations.
      */
     private void generateDeclarations(Node.Nodes page) throws JasperException {
 
@@ -188,12 +187,11 @@ class Generator {
             private boolean getServletInfoGenerated = false;
 
             /*
-             * Generates getServletInfo() method that returns the value of the
-             * page directive's 'info' attribute, if present.
+             * Generates getServletInfo() method that returns the value of the page directive's 'info' attribute, if
+             * present.
              *
-             * The Validator has already ensured that if the translation unit
-             * contains more than one page directive with an 'info' attribute,
-             * their values match.
+             * The Validator has already ensured that if the translation unit contains more than one page directive with
+             * an 'info' attribute, their values match.
              */
             @Override
             public void visit(Node.PageDirective n) throws JasperException {
@@ -231,7 +229,7 @@ class Generator {
             public void visit(Node.CustomTag n) throws JasperException {
                 if (n.useTagPlugin()) {
                     // If a custom tag is configured to use a plug-in
-                    // getAtSTag() and  getAtETag() will always be non-null
+                    // getAtSTag() and getAtETag() will always be non-null
                     n.getAtSTag().visit(this);
                     visitBody(n);
                     n.getAtETag().visit(this);
@@ -248,8 +246,7 @@ class Generator {
     /**
      * Compiles list of tag handler pool names.
      */
-    private void compileTagHandlerPoolList(Node.Nodes page)
-            throws JasperException {
+    private void compileTagHandlerPoolList(Node.Nodes page) throws JasperException {
 
         class TagHandlerPoolVisitor extends Node.Visitor {
 
@@ -265,16 +262,14 @@ class Generator {
             }
 
             /*
-             * Gets the name of the tag handler pool for the given custom tag
-             * and adds it to the list of tag handler pool names unless it is
-             * already contained in it.
+             * Gets the name of the tag handler pool for the given custom tag and adds it to the list of tag handler
+             * pool names unless it is already contained in it.
              */
             @Override
             public void visit(Node.CustomTag n) throws JasperException {
 
                 if (!n.implementsSimpleTag()) {
-                    String name = createTagHandlerPoolName(n.getPrefix(), n
-                            .getLocalName(), n.getAttributes(),
+                    String name = createTagHandlerPoolName(n.getPrefix(), n.getLocalName(), n.getAttributes(),
                             n.getNamedAttributeNodes(), n.hasEmptyBody());
                     n.setTagHandlerPoolName(name);
                     if (!names.contains(name)) {
@@ -285,27 +280,22 @@ class Generator {
             }
 
             /*
-             * Creates the name of the tag handler pool whose tag handlers may
-             * be (re)used to service this action.
+             * Creates the name of the tag handler pool whose tag handlers may be (re)used to service this action.
              *
              * @return The name of the tag handler pool
              */
-            private String createTagHandlerPoolName(String prefix,
-                    String shortName, Attributes attrs, Node.Nodes namedAttrs,
-                    boolean hasEmptyBody) {
+            private String createTagHandlerPoolName(String prefix, String shortName, Attributes attrs,
+                    Node.Nodes namedAttrs, boolean hasEmptyBody) {
                 StringBuilder poolName = new StringBuilder(64);
-                poolName.append("_jspx_tagPool_").append(prefix).append('_')
-                        .append(shortName);
+                poolName.append("_jspx_tagPool_").append(prefix).append('_').append(shortName);
 
                 if (attrs != null) {
-                    String[] attrNames =
-                        new String[attrs.getLength() + namedAttrs.size()];
+                    String[] attrNames = new String[attrs.getLength() + namedAttrs.size()];
                     for (int i = 0; i < attrNames.length; i++) {
                         attrNames[i] = attrs.getQName(i);
                     }
                     for (int i = 0; i < namedAttrs.size(); i++) {
-                        attrNames[attrs.getLength() + i] =
-                            namedAttrs.getNode(i).getQName();
+                        attrNames[attrs.getLength() + i] = namedAttrs.getNode(i).getQName();
                     }
                     Arrays.sort(attrNames, Collections.reverseOrder());
                     if (attrNames.length > 0) {
@@ -326,8 +316,7 @@ class Generator {
         page.visit(new TagHandlerPoolVisitor(tagHandlerPoolNames));
     }
 
-    private void declareTemporaryScriptingVars(Node.Nodes page)
-            throws JasperException {
+    private void declareTemporaryScriptingVars(Node.Nodes page) throws JasperException {
 
         class ScriptingVarVisitor extends Node.Visitor {
 
@@ -350,8 +339,7 @@ class Generator {
                     if (varInfos.length > 0) {
                         for (VariableInfo varInfo : varInfos) {
                             String varName = varInfo.getVarName();
-                            String tmpVarName = "_jspx_" + varName + "_"
-                                    + n.getCustomNestingLevel();
+                            String tmpVarName = "_jspx_" + varName + "_" + n.getCustomNestingLevel();
                             if (!vars.contains(tmpVarName)) {
                                 vars.add(tmpVarName);
                                 out.printin(varInfo.getClassName());
@@ -366,15 +354,12 @@ class Generator {
                         for (TagVariableInfo tagVarInfo : tagVarInfos) {
                             String varName = tagVarInfo.getNameGiven();
                             if (varName == null) {
-                                varName = n.getTagData().getAttributeString(
-                                        tagVarInfo.getNameFromAttribute());
-                            }
-                            else if (tagVarInfo.getNameFromAttribute() != null) {
+                                varName = n.getTagData().getAttributeString(tagVarInfo.getNameFromAttribute());
+                            } else if (tagVarInfo.getNameFromAttribute() != null) {
                                 // alias
                                 continue;
                             }
-                            String tmpVarName = "_jspx_" + varName + "_"
-                                    + n.getCustomNestingLevel();
+                            String tmpVarName = "_jspx_" + varName + "_" + n.getCustomNestingLevel();
                             if (!vars.contains(tmpVarName)) {
                                 vars.add(tmpVarName);
                                 out.printin(tagVarInfo.getClassName());
@@ -398,9 +383,8 @@ class Generator {
     /*
      * Generates getters for instance manager & expression factory.
      *
-     * For JSPs these methods use lazy init. This is not an option for tag files
-     * (at least it would be more complicated to generate) because the
-     * ServletConfig is not readily available.
+     * For JSPs these methods use lazy init. This is not an option for tag files (at least it would be more complicated
+     * to generate) because the ServletConfig is not readily available.
      */
     private void generateGetters() {
         out.printil("public jakarta.el.ExpressionFactory _jsp_getExpressionFactory() {");
@@ -417,7 +401,8 @@ class Generator {
             out.println(" == null) {");
             out.pushIndent();
             out.printin(ctxt.getOptions().getVariableForExpressionFactory());
-            out.println(" = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();");
+            out.println(
+                    " = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();");
             out.popIndent();
             out.printil("}");
             out.popIndent();
@@ -465,9 +450,8 @@ class Generator {
     }
 
     /**
-     * Generates the _jspInit() method for instantiating the tag handler pools.
-     * For tag file, _jspInit has to be invoked manually, and the ServletConfig
-     * object explicitly passed.
+     * Generates the _jspInit() method for instantiating the tag handler pools. For tag file, _jspInit has to be invoked
+     * manually, and the ServletConfig object explicitly passed.
      * <p>
      * In JSP 2.1, we also instantiate an ExpressionFactory
      */
@@ -508,8 +492,8 @@ class Generator {
     }
 
     /**
-     * Generates the _jspDestroy() method which is responsible for calling the
-     * release() method on every tag handler in any of the tag handler pools.
+     * Generates the _jspDestroy() method which is responsible for calling the release() method on every tag handler in
+     * any of the tag handler pools.
      */
     private void generateDestroy() {
 
@@ -529,9 +513,8 @@ class Generator {
     }
 
     /**
-     * Generate preamble package name (shared by servlet and tag handler
-     * preamble generation). Package is always non-null as neither Servlets nor
-     * tags can use a default package.
+     * Generate preamble package name (shared by servlet and tag handler preamble generation). Package is always
+     * non-null as neither Servlets nor tags can use a default package.
      */
     private void genPreamblePackage(String packageName) {
         out.printil("package " + packageName + ";");
@@ -539,8 +522,7 @@ class Generator {
     }
 
     /**
-     * Generate preamble imports (shared by servlet and tag handler preamble
-     * generation)
+     * Generate preamble imports (shared by servlet and tag handler preamble generation)
      */
     private void genPreambleImports() {
         for (String i : pageInfo.getImports()) {
@@ -553,9 +535,8 @@ class Generator {
     }
 
     /**
-     * Generation of static initializers in preamble. For example, dependent
-     * list, el function map, prefix map. (shared by servlet and tag handler
-     * preamble generation)
+     * Generation of static initializers in preamble. For example, dependent list, el function map, prefix map. (shared
+     * by servlet and tag handler preamble generation)
      */
     private void genPreambleStaticInitializers() {
         out.printil("private static final jakarta.servlet.jsp.JspFactory _jspxFactory =");
@@ -572,7 +553,7 @@ class Generator {
             out.printin("_jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(");
             out.print("" + dependants.size());
             out.println(");");
-            for (Entry<String, Long> entry : dependants.entrySet()) {
+            for (Entry<String,Long> entry : dependants.entrySet()) {
                 out.printin("_jspx_dependants.put(\"");
                 out.print(entry.getKey());
                 out.print("\", Long.valueOf(");
@@ -635,9 +616,8 @@ class Generator {
     }
 
     /**
-     * Declare tag handler pools (tags of the same type and with the same
-     * attribute set share the same tag handler pool) (shared by servlet and tag
-     * handler preamble generation)
+     * Declare tag handler pools (tags of the same type and with the same attribute set share the same tag handler pool)
+     * (shared by servlet and tag handler preamble generation)
      * <p>
      * In JSP 2.1, we also scope an instance of ExpressionFactory
      */
@@ -658,8 +638,7 @@ class Generator {
     }
 
     /**
-     * Declare general-purpose methods (shared by servlet and tag handler
-     * preamble generation)
+     * Declare general-purpose methods (shared by servlet and tag handler preamble generation)
      */
     private void genPreambleMethods() {
         // Implement JspSourceDependent
@@ -744,7 +723,8 @@ class Generator {
         // Now the service method
         out.printin("public void ");
         out.print(serviceMethodName);
-        out.println("(final jakarta.servlet.http.HttpServletRequest request, final jakarta.servlet.http.HttpServletResponse response)");
+        out.println(
+                "(final jakarta.servlet.http.HttpServletRequest request, final jakarta.servlet.http.HttpServletResponse response)");
         out.pushIndent();
         out.pushIndent();
         out.printil("throws java.io.IOException, jakarta.servlet.ServletException {");
@@ -762,7 +742,8 @@ class Generator {
             out.printil("return;");
             out.popIndent();
             out.printil("}");
-            out.printil("if (!\"GET\".equals(_jspx_method) && !\"POST\".equals(_jspx_method) && !\"HEAD\".equals(_jspx_method)) {");
+            out.printil(
+                    "if (!\"GET\".equals(_jspx_method) && !\"POST\".equals(_jspx_method) && !\"HEAD\".equals(_jspx_method)) {");
             out.pushIndent();
             out.printil("response.setHeader(\"Allow\",\"GET, HEAD, POST, OPTIONS\");");
             out.printin("response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, ");
@@ -783,7 +764,8 @@ class Generator {
         }
 
         if (pageInfo.isErrorPage()) {
-            out.printil("java.lang.Throwable exception = org.apache.jasper.runtime.JspRuntimeLibrary.getThrowable(request);");
+            out.printil(
+                    "java.lang.Throwable exception = org.apache.jasper.runtime.JspRuntimeLibrary.getThrowable(request);");
             out.printil("if (exception != null) {");
             out.pushIndent();
             out.printil("response.setStatus(jakarta.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR);");
@@ -835,29 +817,25 @@ class Generator {
     }
 
     /**
-     * Generates an XML Prolog, which includes an XML declaration and an XML
-     * doctype declaration.
+     * Generates an XML Prolog, which includes an XML declaration and an XML doctype declaration.
      */
     private void generateXmlProlog(Node.Nodes page) {
 
         /*
-         * An XML declaration is generated under the following conditions: a)
-         * 'omit-xml-declaration' attribute of <jsp:output> action is set to
-         * "no" or "false"; b) JSP document without a <jsp:root>.
+         * An XML declaration is generated under the following conditions: a) 'omit-xml-declaration' attribute of
+         * <jsp:output> action is set to "no" or "false"; b) JSP document without a <jsp:root>.
          */
         String omitXmlDecl = pageInfo.getOmitXmlDecl();
         if ((omitXmlDecl != null && !JspUtil.booleanValue(omitXmlDecl)) ||
                 (omitXmlDecl == null && page.getRoot().isXmlSyntax() && !pageInfo.hasJspRoot() && !ctxt.isTagFile())) {
             String cType = pageInfo.getContentType();
             String charSet = cType.substring(cType.indexOf("charset=") + 8);
-            out.printil("out.write(\"<?xml version=\\\"1.0\\\" encoding=\\\""
-                    + charSet + "\\\"?>\\n\");");
+            out.printil("out.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"" + charSet + "\\\"?>\\n\");");
         }
 
         /*
-         * Output a DOCTYPE declaration if the doctype-root-element appears. If
-         * doctype-public appears: <!DOCTYPE name PUBLIC "doctypePublic"
-         * "doctypeSystem"> else <!DOCTYPE name SYSTEM "doctypeSystem" >
+         * Output a DOCTYPE declaration if the doctype-root-element appears. If doctype-public appears: <!DOCTYPE name
+         * PUBLIC "doctypePublic" "doctypeSystem"> else <!DOCTYPE name SYSTEM "doctypeSystem" >
          */
         String doctypeName = pageInfo.getDoctypeName();
         if (doctypeName != null) {
@@ -887,11 +865,9 @@ class Generator {
         /*
          * Map containing introspection information on tag handlers:
          *
-         * <key>: tag prefix <value>: Map containing introspection on tag
-         * handlers
+         * <key>: tag prefix <value>: Map containing introspection on tag handlers
          *
-         * <key>: tag short name <value>: introspection info of tag
-         * handler for <prefix:shortName> tag
+         * <key>: tag short name <value>: introspection info of tag handler for <prefix:shortName> tag
          */
         private final Map<String,Map<String,TagHandlerInfo>> handlerInfos;
 
@@ -925,10 +901,8 @@ class Generator {
 
         private final boolean useInstanceManagerForTags;
 
-        GenerateVisitor(boolean isTagFile, ServletWriter out,
-                ArrayList<GenBuffer> methodsBuffered,
-                FragmentHelperClass fragmentHelperClass,
-                boolean useInstanceManagerForTags) {
+        GenerateVisitor(boolean isTagFile, ServletWriter out, ArrayList<GenBuffer> methodsBuffered,
+                FragmentHelperClass fragmentHelperClass, boolean useInstanceManagerForTags) {
 
             this.isTagFile = isTagFile;
             this.out = out;
@@ -942,69 +916,56 @@ class Generator {
         }
 
         /**
-         * Returns an attribute value, optionally URL encoded. If the value is a
-         * runtime expression, the result is the expression itself, as a string.
-         * If the result is an EL expression, we insert a call to the
-         * interpreter. If the result is a Named Attribute we insert the
-         * generated variable name. Otherwise the result is a string literal,
-         * quoted and escaped.
+         * Returns an attribute value, optionally URL encoded. If the value is a runtime expression, the result is the
+         * expression itself, as a string. If the result is an EL expression, we insert a call to the interpreter. If
+         * the result is a Named Attribute we insert the generated variable name. Otherwise the result is a string
+         * literal, quoted and escaped.
          *
-         * @param attr
-         *            An JspAttribute object
-         * @param encode
-         *            true if to be URL encoded
-         * @param expectedType
-         *            the expected type for an EL evaluation (ignored for
-         *            attributes that aren't EL expressions)
+         * @param attr         An JspAttribute object
+         * @param encode       true if to be URL encoded
+         * @param expectedType the expected type for an EL evaluation (ignored for attributes that aren't EL
+         *                         expressions)
          */
-        private String attributeValue(Node.JspAttribute attr, boolean encode,
-                Class<?> expectedType) {
+        private String attributeValue(Node.JspAttribute attr, boolean encode, Class<?> expectedType) {
             // Use the explicit lookup for character encoding
             return attributeValue(attr, encode, expectedType, REQUEST_CHARACTER_ENCODING_TEXT);
         }
 
         /**
-         * Returns an attribute value, optionally URL encoded. If the value is a
-         * runtime expression, the result is the expression itself, as a string.
-         * If the result is an EL expression, we insert a call to the
-         * interpreter. If the result is a Named Attribute we insert the
-         * generated variable name. Otherwise the result is a string literal,
-         * quoted and escaped.
+         * Returns an attribute value, optionally URL encoded. If the value is a runtime expression, the result is the
+         * expression itself, as a string. If the result is an EL expression, we insert a call to the interpreter. If
+         * the result is a Named Attribute we insert the generated variable name. Otherwise the result is a string
+         * literal, quoted and escaped.
          *
-         * @param attr
-         *            An JspAttribute object
-         * @param encode
-         *            true if to be URL encoded
-         * @param expectedType
-         *            the expected type for an EL evaluation (ignored for
-         *            attributes that aren't EL expressions)
-         * @param requestEncodingText
-         *            text referring to the request encoding, either a local variable
-         *            or a call to the request
+         * @param attr                An JspAttribute object
+         * @param encode              true if to be URL encoded
+         * @param expectedType        the expected type for an EL evaluation (ignored for attributes that aren't EL
+         *                                expressions)
+         * @param requestEncodingText text referring to the request encoding, either a local variable or a call to the
+         *                                request
          */
-        private String attributeValue(Node.JspAttribute attr, boolean encode,
-                Class<?> expectedType, String requestEncodingText) {
+        private String attributeValue(Node.JspAttribute attr, boolean encode, Class<?> expectedType,
+                String requestEncodingText) {
             String v = attr.getValue();
             if (attr.isExpression()) {
                 if (encode) {
-                    return "org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode(String.valueOf("
-                            + v + "), " + requestEncodingText + ")";
+                    return "org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode(String.valueOf(" + v + "), " +
+                            requestEncodingText + ")";
                 }
                 return v;
             } else if (attr.isELInterpreterInput()) {
-                v = elInterpreter.interpreterCall(ctxt, this.isTagFile, v,
-                        expectedType, attr.getEL().getMapName());
+                v = elInterpreter.interpreterCall(ctxt, this.isTagFile, v, expectedType, attr.getEL().getMapName());
                 if (encode) {
-                    return "org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("
-                            + v + ", " + requestEncodingText + ")";
+                    return "org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode(" + v + ", " + requestEncodingText +
+                            ")";
                 }
                 return v;
             } else if (attr.isNamedAttribute()) {
                 return attr.getNamedAttributeNode().getTemporaryVariableName();
             } else {
                 if (encode) {
-                    return "org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("
-                            + quote(v) + ", " + requestEncodingText + ")";
+                    return "org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode(" + quote(v) + ", " +
+                            requestEncodingText + ")";
                 }
                 return quote(v);
             }
@@ -1012,29 +973,22 @@ class Generator {
 
 
         /**
-         * Prints the attribute value specified in the param action, in the form
-         * of name=value string.
+         * Prints the attribute value specified in the param action, in the form of name=value string.
          *
-         * @param n
-         *            the parent node for the param action nodes.
+         * @param n the parent node for the param action nodes.
          */
-        private void printParams(Node n, String pageParam, boolean literal)
-                throws JasperException {
+        private void printParams(Node n, String pageParam, boolean literal) throws JasperException {
             printParams(n, pageParam, literal, REQUEST_CHARACTER_ENCODING_TEXT);
         }
+
         /**
-         * Prints the attribute value specified in the param action, in the form
-         * of name=value string.
+         * Prints the attribute value specified in the param action, in the form of name=value string.
          *
-         * @param n
-         *            the parent node for the param action nodes.
-         * @param pageParam
-         *            text identifying the JSP to forward/include
-         * @param literal
-         *            whether the pageParam is a literal expression (not EL)
-         * @param requestEncodingText
-         *            text referring to the request encoding, either a local variable
-         *            or a call to the request
+         * @param n                   the parent node for the param action nodes.
+         * @param pageParam           text identifying the JSP to forward/include
+         * @param literal             whether the pageParam is a literal expression (not EL)
+         * @param requestEncodingText text referring to the request encoding, either a local variable or a call to the
+         *                                request
          */
         private void printParams(Node n, String pageParam, boolean literal, String requestEncodingText)
                 throws JasperException {
@@ -1052,9 +1006,8 @@ class Generator {
                     out.print(" + ");
                     out.print(separator);
                     out.print(" + ");
-                    out.print("org.apache.jasper.runtime.JspRuntimeLibrary."
-                            + "URLEncode(" + quote(n.getTextAttribute("name"))
-                            + ", " + requestEncodingText + ")");
+                    out.print("org.apache.jasper.runtime.JspRuntimeLibrary." + "URLEncode(" +
+                            quote(n.getTextAttribute("name")) + ", " + requestEncodingText + ")");
                     out.print("+ \"=\" + ");
                     out.print(attributeValue(n.getValue(), true, String.class, requestEncodingText));
 
@@ -1094,11 +1047,8 @@ class Generator {
         @Override
         public void visit(Node.ELExpression n) throws JasperException {
             n.setBeginJavaLine(out.getJavaLine());
-            out.printil("out.write("
-                    + elInterpreter.interpreterCall(ctxt, this.isTagFile,
-                            n.getType() + "{" + n.getText() + "}",
-                            String.class, n.getEL().getMapName()) +
-                    ");");
+            out.printil("out.write(" + elInterpreter.interpreterCall(ctxt, this.isTagFile,
+                    n.getType() + "{" + n.getText() + "}", String.class, n.getEL().getMapName()) + ");");
             n.setEndJavaLine(out.getJavaLine());
         }
 
@@ -1117,8 +1067,7 @@ class Generator {
                 // If the page for jsp:include was specified via
                 // jsp:attribute, first generate code to evaluate
                 // that body.
-                pageParam = generateNamedAttributeValue(page
-                        .getNamedAttributeNode());
+                pageParam = generateNamedAttributeValue(page.getNamedAttributeNode());
             } else {
                 pageParam = attributeValue(page, false, String.class);
             }
@@ -1143,8 +1092,7 @@ class Generator {
 
         private void generateInclude(Node.IncludeAction n, Node.JspAttribute page, boolean isFlush, String pageParam)
                 throws JasperException {
-            out.printin("org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "
-                    + pageParam);
+            out.printin("org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, " + pageParam);
             printParams(n, pageParam, page.isLiteral());
             out.println(", out, " + isFlush + ");");
         }
@@ -1159,17 +1107,15 @@ class Generator {
             String requestEncodingVariableName = temporaryVariableName + "_requestEncoding";
             out.printin("String " + requestEncodingVariableName + " = " + REQUEST_CHARACTER_ENCODING_TEXT + ";");
             out.println();
-            out.printin("org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "
-                    + urlVariableName);
+            out.printin("org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, " + urlVariableName);
             printParams(n, urlVariableName, page.isLiteral(), requestEncodingVariableName);
             out.println(", out, " + isFlush + ");");
         }
 
         /**
-         * Scans through all child nodes of the given parent for &lt;param&gt;
-         * subelements. For each &lt;param&gt; element, if its value is specified via
-         * a Named Attribute (&lt;jsp:attribute&gt;), generate the code to evaluate
-         * those bodies first.
+         * Scans through all child nodes of the given parent for &lt;param&gt; subelements. For each &lt;param&gt;
+         * element, if its value is specified via a Named Attribute (&lt;jsp:attribute&gt;), generate the code to
+         * evaluate those bodies first.
          * <p>
          * {@code parent} is assumed to be non-null
          */
@@ -1181,8 +1127,7 @@ class Generator {
                     // Validation during parsing ensures n is an instance of
                     // Node.ParamAction
                     Node.Nodes paramSubElements = n.getBody();
-                    for (int j = 0; (paramSubElements != null)
-                            && (j < paramSubElements.size()); j++) {
+                    for (int j = 0; (paramSubElements != null) && (j < paramSubElements.size()); j++) {
                         Node m = paramSubElements.getNode(j);
                         if (m instanceof Node.NamedAttribute) {
                             generateNamedAttributeValue((Node.NamedAttribute) m);
@@ -1193,8 +1138,7 @@ class Generator {
         }
 
         /**
-         * Finds the &lt;jsp:body&gt; subelement of the given parent node. If not
-         * found, null is returned.
+         * Finds the &lt;jsp:body&gt; subelement of the given parent node. If not found, null is returned.
          */
         private Node.JspBody findJspBody(Node parent) {
             Node.JspBody result = null;
@@ -1268,23 +1212,15 @@ class Generator {
                 String beanName = bean.getCanonicalName();
                 Method meth = JspRuntimeLibrary.getReadMethod(bean, property);
                 String methodName = meth.getName();
-                out.printil("out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString("
-                        + "((("
-                        + beanName
-                        + ")_jspx_page_context.findAttribute("
-                        + "\""
-                        + name + "\"))." + methodName + "())));");
+                out.printil("out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString(" + "(((" + beanName +
+                        ")_jspx_page_context.findAttribute(" + "\"" + name + "\"))." + methodName + "())));");
             } else if (!ctxt.getOptions().getStrictGetProperty() || varInfoNames.contains(name)) {
                 // The object is a custom action with an associated
                 // VariableInfo entry for this name.
                 // Get the class name and then introspect at runtime.
-                out.printil("out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString"
-                        + "(org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty"
-                        + "(_jspx_page_context.findAttribute(\""
-                        + name
-                        + "\"), \""
-                        + property
-                        + "\")));");
+                out.printil("out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString" +
+                        "(org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty" +
+                        "(_jspx_page_context.findAttribute(\"" + name + "\"), \"" + property + "\")));");
             } else {
                 throw new JasperException(Localizer.getMessage("jsp.error.invalid.name", n.getStart(), name));
             }
@@ -1302,31 +1238,18 @@ class Generator {
             n.setBeginJavaLine(out.getJavaLine());
 
             if ("*".equals(property)) {
-                out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.introspect("
-                        + "_jspx_page_context.findAttribute("
-                        + "\""
-                        + name + "\"), request);");
+                out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.introspect(" +
+                        "_jspx_page_context.findAttribute(" + "\"" + name + "\"), request);");
             } else if (value == null) {
-                if (param == null)
-                 {
+                if (param == null) {
                     param = property; // default to same as property
                 }
-                out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper("
-                        + "_jspx_page_context.findAttribute(\""
-                        + name
-                        + "\"), \""
-                        + property
-                        + "\", request.getParameter(\""
-                        + param
-                        + "\"), "
-                        + "request, \""
-                        + param
-                        + "\", false);");
+                out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(" +
+                        "_jspx_page_context.findAttribute(\"" + name + "\"), \"" + property +
+                        "\", request.getParameter(\"" + param + "\"), " + "request, \"" + param + "\", false);");
             } else if (value.isExpression()) {
-                out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.handleSetProperty("
-                        + "_jspx_page_context.findAttribute(\""
-                        + name
-                        + "\"), \"" + property + "\",");
+                out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.handleSetProperty(" +
+                        "_jspx_page_context.findAttribute(\"" + name + "\"), \"" + property + "\",");
                 out.print(attributeValue(value, false, null));
                 out.println(");");
             } else if (value.isELInterpreterInput()) {
@@ -1343,35 +1266,20 @@ class Generator {
                 // - 'pageContext' is a VariableResolver.
                 // - 'this' (either the generated Servlet or the generated tag
                 // handler for Tag files) is a FunctionMapper.
-                out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.handleSetPropertyExpression("
-                        + "_jspx_page_context.findAttribute(\""
-                        + name
-                        + "\"), \""
-                        + property
-                        + "\", "
-                        + quote(value.getValue())
-                        + ", "
-                        + "_jspx_page_context, "
-                        + value.getEL().getMapName() + ");");
+                out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.handleSetPropertyExpression(" +
+                        "_jspx_page_context.findAttribute(\"" + name + "\"), \"" + property + "\", " +
+                        quote(value.getValue()) + ", " + "_jspx_page_context, " + value.getEL().getMapName() + ");");
             } else if (value.isNamedAttribute()) {
                 // If the value for setProperty was specified via
                 // jsp:attribute, first generate code to evaluate
                 // that body.
-                String valueVarName = generateNamedAttributeValue(value
-                        .getNamedAttributeNode());
-                out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper("
-                        + "_jspx_page_context.findAttribute(\""
-                        + name
-                        + "\"), \""
-                        + property
-                        + "\", "
-                        + valueVarName
-                        + ", null, null, false);");
+                String valueVarName = generateNamedAttributeValue(value.getNamedAttributeNode());
+                out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(" +
+                        "_jspx_page_context.findAttribute(\"" + name + "\"), \"" + property + "\", " + valueVarName +
+                        ", null, null, false);");
             } else {
-                out.printin("org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper("
-                        + "_jspx_page_context.findAttribute(\""
-                        + name
-                        + "\"), \"" + property + "\", ");
+                out.printin("org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(" +
+                        "_jspx_page_context.findAttribute(\"" + name + "\"), \"" + property + "\", ");
                 out.print(attributeValue(value, false, null));
                 out.println(", null, null, false);");
             }
@@ -1408,11 +1316,10 @@ class Generator {
                     // No need to test for being an interface here as the
                     // getConstructor() call above will have already failed for
                     // any interfaces.
-                    if (!Modifier.isPublic(modifiers) ||
-                            Modifier.isAbstract(modifiers) ||
-                            !constructor.canAccess(null) ) {
-                        throw new JasperException(Localizer.getMessage("jsp.error.invalid.bean",
-                                Integer.valueOf(modifiers)));
+                    if (!Modifier.isPublic(modifiers) || Modifier.isAbstract(modifiers) ||
+                            !constructor.canAccess(null)) {
+                        throw new JasperException(
+                                Localizer.getMessage("jsp.error.invalid.bean", Integer.valueOf(modifiers)));
                     }
                     // At compile time, we have determined that the bean class
                     // exists, with a public zero constructor, new() can be
@@ -1422,8 +1329,7 @@ class Generator {
                     // Cannot instantiate the specified class, either a
                     // compilation error or a runtime error will be raised,
                     // depending on a compiler flag.
-                    if (ctxt.getOptions()
-                            .getErrorOnUseBeanInvalidClassAttribute()) {
+                    if (ctxt.getOptions().getErrorOnUseBeanInvalidClassAttribute()) {
                         err.jspError(n, "jsp.error.invalid.bean", klass);
                     }
                     if (canonicalName == null) {
@@ -1489,8 +1395,8 @@ class Generator {
             out.pushIndent();
             if (klass == null && beanName == null) {
                 /*
-                 * If both class name and beanName is not specified, the bean
-                 * must be found locally, otherwise it's an error
+                 * If both class name and beanName is not specified, the bean must be found locally, otherwise it's an
+                 * error
                  */
                 out.printin("throw new java.lang.InstantiationException(\"bean ");
                 out.print(name);
@@ -1506,8 +1412,7 @@ class Generator {
                             // If the value for beanName was specified via
                             // jsp:attribute, first generate code to evaluate
                             // that body.
-                            binaryName = generateNamedAttributeValue(beanName
-                                    .getNamedAttributeNode());
+                            binaryName = generateNamedAttributeValue(beanName.getNamedAttributeNode());
                         } else {
                             binaryName = attributeValue(beanName, false, String.class);
                         }
@@ -1526,8 +1431,7 @@ class Generator {
                     out.println(");");
                     out.popIndent();
                     /*
-                     * Note: Beans.instantiate throws ClassNotFoundException if
-                     * the bean class is abstract.
+                     * Note: Beans.instantiate throws ClassNotFoundException if the bean class is abstract.
                      */
                     out.printil("} catch (java.lang.ClassNotFoundException exc) {");
                     out.pushIndent();
@@ -1592,8 +1496,7 @@ class Generator {
             TagHandlerInfo handlerInfo = getTagHandlerInfo(n);
 
             // Create variable names
-            String baseVar = createTagVarName(n.getQName(), n.getPrefix(), n
-                    .getLocalName());
+            String baseVar = createTagVarName(n.getQName(), n.getPrefix(), n.getLocalName());
             String tagEvalVar = "_jspx_eval_" + baseVar;
             String tagHandlerVar = "_jspx_th_" + baseVar;
             String tagPushBodyCountVar = "_jspx_push_body_count_" + baseVar;
@@ -1630,13 +1533,10 @@ class Generator {
                 // Set up new buffer for the method
                 outSave = out;
                 /*
-                 * For fragments, their bodies will be generated in fragment
-                 * helper classes, and the Java line adjustments will be done
-                 * there, hence they are set to null here to avoid double
-                 * adjustments.
+                 * For fragments, their bodies will be generated in fragment helper classes, and the Java line
+                 * adjustments will be done there, hence they are set to null here to avoid double adjustments.
                  */
-                GenBuffer genBuffer = new GenBuffer(n,
-                        n.implementsSimpleTag() ? null : n.getBody());
+                GenBuffer genBuffer = new GenBuffer(n, n.implementsSimpleTag() ? null : n.getBody());
                 methodsBuffered.add(genBuffer);
                 out = genBuffer.getOut();
 
@@ -1694,8 +1594,7 @@ class Generator {
                     // tagInfo is always non-null
                     String name = tagInfo.getNameGiven();
                     if (name == null) {
-                        String nameFromAttribute =
-                                tagInfo.getNameFromAttribute();
+                        String nameFromAttribute = tagInfo.getNameFromAttribute();
                         name = n.getAttributeValue(nameFromAttribute);
                     }
                     pageInfo.getVarInfoNames().add(name);
@@ -1707,11 +1606,9 @@ class Generator {
                 generateCustomDoTag(n, handlerInfo, tagHandlerVar);
             } else {
                 /*
-                 * Classic tag handler: Generate code for start element, body,
-                 * and end element
+                 * Classic tag handler: Generate code for start element, body, and end element
                  */
-                generateCustomStart(n, handlerInfo, tagHandlerVar, tagEvalVar,
-                        tagPushBodyCountVar);
+                generateCustomStart(n, handlerInfo, tagHandlerVar, tagEvalVar, tagPushBodyCountVar);
 
                 // visit body
                 String tmpParent = parent;
@@ -1735,8 +1632,7 @@ class Generator {
                 }
                 isSimpleTagHandler = tmpIsSimpleTagHandler;
 
-                generateCustomEnd(n, tagHandlerVar, tagEvalVar,
-                        tagPushBodyCountVar);
+                generateCustomEnd(n, tagHandlerVar, tagEvalVar, tagPushBodyCountVar);
             }
 
             if (ci.isScriptless() && !ci.hasScriptingVars()) {
@@ -1845,20 +1741,16 @@ class Generator {
                             continue;
                         }
                     }
-                    value = generateNamedAttributeValue(
-                            attrs[i].getNamedAttributeNode());
+                    value = generateNamedAttributeValue(attrs[i].getNamedAttributeNode());
                     if ("\"false\"".equals(omit)) {
-                        nvp = " + \" " + attrs[i].getName() + "=\\\"\" + " +
-                                value + " + \"\\\"\"";
+                        nvp = " + \" " + attrs[i].getName() + "=\\\"\" + " + value + " + \"\\\"\"";
                     } else {
-                        nvp = " + (java.lang.Boolean.valueOf(" + omit + ")?\"\":\" " +
-                                attrs[i].getName() + "=\\\"\" + " + value +
-                                " + \"\\\"\")";
+                        nvp = " + (java.lang.Boolean.valueOf(" + omit + ")?\"\":\" " + attrs[i].getName() +
+                                "=\\\"\" + " + value + " + \"\\\"\")";
                     }
                 } else {
                     value = attributeValue(attrs[i], false, Object.class);
-                    nvp = " + \" " + attrs[i].getName() + "=\\\"\" + " +
-                            value + " + \"\\\"\"";
+                    nvp = " + \" " + attrs[i].getName() + "=\\\"\" + " + value + " + \"\\\"\"";
                 }
                 map.put(attrs[i].getName(), nvp);
             }
@@ -1870,7 +1762,7 @@ class Generator {
             out.print(" + " + elemName);
 
             // Write remaining attributes
-            for (Entry<String, String> attrEntry : map.entrySet()) {
+            for (Entry<String,String> attrEntry : map.entrySet()) {
                 out.print(attrEntry.getValue());
             }
 
@@ -2003,34 +1895,34 @@ class Generator {
                 char ch = text.charAt(i);
                 --count;
                 switch (ch) {
-                case '"':
-                    sb.append('\\').append('\"');
-                    break;
-                case '\\':
-                    sb.append('\\').append('\\');
-                    break;
-                case '\r':
-                    sb.append('\\').append('r');
-                    break;
-                case '\n':
-                    sb.append('\\').append('n');
-                    srcLine++;
-
-                    if (breakAtLF || count < 0) {
-                        // Generate an out.write() when see a '\n' in template
-                        sb.append("\");");
-                        out.println(sb.toString());
-                        if (i < text.length() - 1) {
-                            out.printin();
+                    case '"':
+                        sb.append('\\').append('\"');
+                        break;
+                    case '\\':
+                        sb.append('\\').append('\\');
+                        break;
+                    case '\r':
+                        sb.append('\\').append('r');
+                        break;
+                    case '\n':
+                        sb.append('\\').append('n');
+                        srcLine++;
+
+                        if (breakAtLF || count < 0) {
+                            // Generate an out.write() when see a '\n' in template
+                            sb.append("\");");
+                            out.println(sb.toString());
+                            if (i < text.length() - 1) {
+                                out.printin();
+                            }
+                            sb.setLength(initLength);
+                            count = JspUtil.CHUNKSIZE;
                         }
-                        sb.setLength(initLength);
-                        count = JspUtil.CHUNKSIZE;
-                    }
-                    // add a Smap for this line
-                    n.addSmap(srcLine);
-                    break;
-                default:
-                    sb.append(ch);
+                        // add a Smap for this line
+                        n.addSmap(srcLine);
+                        break;
+                    default:
+                        sb.append(ch);
                 }
             }
 
@@ -2157,19 +2049,16 @@ class Generator {
             // attributes that are present.
             for (int i = 0; i < attrs.length; i++) {
                 if (attrs[i].getName().equals(n.getName())) {
-                    out.print(evaluateAttribute(getTagHandlerInfo(tag),
-                            attrs[i], tag, null));
+                    out.print(evaluateAttribute(getTagHandlerInfo(tag), attrs[i], tag, null));
                     break;
                 }
             }
         }
 
-        private TagHandlerInfo getTagHandlerInfo(Node.CustomTag n)
-                throws JasperException {
-            Map<String, TagHandlerInfo> handlerInfosByShortName = handlerInfos.
-                computeIfAbsent(n.getPrefix(), k -> new HashMap<>());
-            TagHandlerInfo handlerInfo =
-                handlerInfosByShortName.get(n.getLocalName());
+        private TagHandlerInfo getTagHandlerInfo(Node.CustomTag n) throws JasperException {
+            Map<String,TagHandlerInfo> handlerInfosByShortName =
+                    handlerInfos.computeIfAbsent(n.getPrefix(), k -> new HashMap<>());
+            TagHandlerInfo handlerInfo = handlerInfosByShortName.get(n.getLocalName());
             if (handlerInfo == null) {
                 handlerInfo = new TagHandlerInfo(n, n.getTagHandlerClass(), err);
                 handlerInfosByShortName.put(n.getLocalName(), handlerInfo);
@@ -2183,13 +2072,10 @@ class Generator {
             n.getAtETag().visit(this);
         }
 
-        private void generateCustomStart(Node.CustomTag n,
-                TagHandlerInfo handlerInfo, String tagHandlerVar,
-                String tagEvalVar, String tagPushBodyCountVar)
-                throws JasperException {
+        private void generateCustomStart(Node.CustomTag n, TagHandlerInfo handlerInfo, String tagHandlerVar,
+                String tagEvalVar, String tagPushBodyCountVar) throws JasperException {
 
-            Class<?> tagHandlerClass =
-                handlerInfo.getTagHandlerClass();
+            Class<?> tagHandlerClass = handlerInfo.getTagHandlerClass();
 
             out.printin("//  ");
             out.println(n.getQName());
@@ -2316,8 +2202,8 @@ class Generator {
             out.println(");");
         }
 
-        private void generateCustomEnd(Node.CustomTag n, String tagHandlerVar,
-                String tagEvalVar, String tagPushBodyCountVar) {
+        private void generateCustomEnd(Node.CustomTag n, String tagHandlerVar, String tagEvalVar,
+                String tagPushBodyCountVar) {
 
             if (!n.hasEmptyBody()) {
                 if (n.implementsIterationTag()) {
@@ -2429,12 +2315,10 @@ class Generator {
         }
 
 
-        private void generateCustomDoTag(Node.CustomTag n,
-                TagHandlerInfo handlerInfo, String tagHandlerVar)
+        private void generateCustomDoTag(Node.CustomTag n, TagHandlerInfo handlerInfo, String tagHandlerVar)
                 throws JasperException {
 
-            Class<?> tagHandlerClass =
-                handlerInfo.getTagHandlerClass();
+            Class<?> tagHandlerClass = handlerInfo.getTagHandlerClass();
 
             n.setBeginJavaLine(out.getJavaLine());
             out.printin("//  ");
@@ -2457,9 +2341,8 @@ class Generator {
             // Set the body
             if (findJspBody(n) == null) {
                 /*
-                 * Encapsulate body of custom tag invocation in JspFragment and
-                 * pass it to tag handler's setJspBody(), unless tag body is
-                 * empty
+                 * Encapsulate body of custom tag invocation in JspFragment and pass it to tag handler's setJspBody(),
+                 * unless tag body is empty
                  */
                 if (!n.hasEmptyBody()) {
                     out.printin(tagHandlerVar);
@@ -2469,10 +2352,8 @@ class Generator {
                 }
             } else {
                 /*
-                 * Body of tag is the body of the <jsp:body> element. The visit
-                 * method for that element is going to encapsulate that
-                 * element's body in a JspFragment and pass it to the tag
-                 * handler's setJspBody()
+                 * Body of tag is the body of the <jsp:body> element. The visit method for that element is going to
+                 * encapsulate that element's body in a JspFragment and pass it to the tag handler's setJspBody()
                  */
                 String tmpTagHandlerVar = simpleTagHandlerVar;
                 simpleTagHandlerVar = tagHandlerVar;
@@ -2529,8 +2410,7 @@ class Generator {
                         TagVariableInfo tagVarInfo = (TagVariableInfo) elem;
                         String varName = tagVarInfo.getNameGiven();
                         if (varName == null) {
-                            varName = n.getTagData().getAttributeString(
-                                    tagVarInfo.getNameFromAttribute());
+                            varName = n.getTagData().getAttributeString(tagVarInfo.getNameFromAttribute());
                         } else if (tagVarInfo.getNameFromAttribute() != null) {
                             // alias
                             continue;
@@ -2547,11 +2427,9 @@ class Generator {
         /*
          * This method is called as part of the custom tag's start element.
          *
-         * If the given custom tag has a custom nesting level greater than 0,
-         * save the current values of its scripting variables to temporary
-         * variables, so those values may be restored in the tag's end element.
-         * This way, the scripting variables may be synchronized by the given
-         * tag without affecting their original values.
+         * If the given custom tag has a custom nesting level greater than 0, save the current values of its scripting
+         * variables to temporary variables, so those values may be restored in the tag's end element. This way, the
+         * scripting variables may be synchronized by the given tag without affecting their original values.
          */
         private void saveScriptingVars(Node.CustomTag n, int scope) {
             if (n.getCustomNestingLevel() == 0) {
@@ -2585,8 +2463,7 @@ class Generator {
                         continue;
                     }
                     String varName = varInfo.getVarName();
-                    String tmpVarName = "_jspx_" + varName + "_"
-                            + n.getCustomNestingLevel();
+                    String tmpVarName = "_jspx_" + varName + "_" + n.getCustomNestingLevel();
                     out.printin(tmpVarName);
                     out.print(" = ");
                     out.print(varName);
@@ -2604,16 +2481,14 @@ class Generator {
                     }
                     String varName = tagVarInfo.getNameGiven();
                     if (varName == null) {
-                        varName = n.getTagData().getAttributeString(
-                                tagVarInfo.getNameFromAttribute());
+                        varName = n.getTagData().getAttributeString(tagVarInfo.getNameFromAttribute());
                     }
                     // Alias is not possible here.
                     // Alias can only be configured for tag files. As SimpleTag
                     // implementations, isFragment will always be true above
                     // hence execution never reaches this point.
 
-                    String tmpVarName = "_jspx_" + varName + "_"
-                            + n.getCustomNestingLevel();
+                    String tmpVarName = "_jspx_" + varName + "_" + n.getCustomNestingLevel();
                     out.printin(tmpVarName);
                     out.print(" = ");
                     out.print(varName);
@@ -2625,9 +2500,8 @@ class Generator {
         /*
          * This method is called as part of the custom tag's end element.
          *
-         * If the given custom tag has a custom nesting level greater than 0,
-         * restore its scripting variables to their original values that were
-         * saved in the tag's start element.
+         * If the given custom tag has a custom nesting level greater than 0, restore its scripting variables to their
+         * original values that were saved in the tag's start element.
          */
         private void restoreScriptingVars(Node.CustomTag n, int scope) {
             if (n.getCustomNestingLevel() == 0) {
@@ -2661,8 +2535,7 @@ class Generator {
                         continue;
                     }
                     String varName = varInfo.getVarName();
-                    String tmpVarName = "_jspx_" + varName + "_"
-                            + n.getCustomNestingLevel();
+                    String tmpVarName = "_jspx_" + varName + "_" + n.getCustomNestingLevel();
                     out.printin(varName);
                     out.print(" = ");
                     out.print(tmpVarName);
@@ -2680,16 +2553,14 @@ class Generator {
                     }
                     String varName = tagVarInfo.getNameGiven();
                     if (varName == null) {
-                        varName = n.getTagData().getAttributeString(
-                                tagVarInfo.getNameFromAttribute());
+                        varName = n.getTagData().getAttributeString(tagVarInfo.getNameFromAttribute());
                     }
                     // Alias is not possible here.
                     // Alias can only be configured for tag files. As SimpleTag
                     // implementations, isFragment will always be true above
                     // hence execution never reaches this point.
 
-                    String tmpVarName = "_jspx_" + varName + "_"
-                            + n.getCustomNestingLevel();
+                    String tmpVarName = "_jspx_" + varName + "_" + n.getCustomNestingLevel();
                     out.printin(varName);
                     out.print(" = ");
                     out.print(tmpVarName);
@@ -2699,8 +2570,7 @@ class Generator {
         }
 
         /*
-         * Synchronizes the scripting variables of the given custom tag for the
-         * given scope.
+         * Synchronizes the scripting variables of the given custom tag for the given scope.
          */
         private void syncScriptingVars(Node.CustomTag n, int scope) {
             if (isFragment) {
@@ -2735,8 +2605,7 @@ class Generator {
                     if (tagVarInfo.getScope() == scope) {
                         String name = tagVarInfo.getNameGiven();
                         if (name == null) {
-                            name = n.getTagData().getAttributeString(
-                                    tagVarInfo.getNameFromAttribute());
+                            name = n.getTagData().getAttributeString(tagVarInfo.getNameFromAttribute());
                         } else if (tagVarInfo.getNameFromAttribute() != null) {
                             // alias
                             continue;
@@ -2760,12 +2629,10 @@ class Generator {
         }
 
         /*
-         * Creates a tag variable name by concatenating the given prefix and
-         * shortName and encoded to make the resultant string a valid Java
-         * Identifier.
+         * Creates a tag variable name by concatenating the given prefix and shortName and encoded to make the resultant
+         * string a valid Java Identifier.
          */
-        private String createTagVarName(String fullName, String prefix,
-                String shortName) {
+        private String createTagVarName(String fullName, String prefix, String shortName) {
 
             String varName;
             synchronized (tagVarNumbers) {
@@ -2773,8 +2640,7 @@ class Generator {
                 if (tagVarNumbers.get(fullName) != null) {
                     Integer i = tagVarNumbers.get(fullName);
                     varName = varName + i.intValue();
-                    tagVarNumbers.put(fullName,
-                            Integer.valueOf(i.intValue() + 1));
+                    tagVarNumbers.put(fullName, Integer.valueOf(i.intValue() + 1));
                 } else {
                     tagVarNumbers.put(fullName, Integer.valueOf(1));
                     varName = varName + "0";
@@ -2784,20 +2650,17 @@ class Generator {
         }
 
         @SuppressWarnings("null")
-        private String evaluateAttribute(TagHandlerInfo handlerInfo,
-                Node.JspAttribute attr, Node.CustomTag n, String tagHandlerVar)
-                throws JasperException {
+        private String evaluateAttribute(TagHandlerInfo handlerInfo, Node.JspAttribute attr, Node.CustomTag n,
+                String tagHandlerVar) throws JasperException {
 
             String attrValue = attr.getValue();
             if (attrValue == null) {
                 // Must be a named attribute
                 if (n.checkIfAttributeIsJspFragment(attr.getName())) {
                     // XXX - no need to generate temporary variable here
-                    attrValue = generateNamedAttributeJspFragment(attr
-                            .getNamedAttributeNode(), tagHandlerVar);
+                    attrValue = generateNamedAttributeJspFragment(attr.getNamedAttributeNode(), tagHandlerVar);
                 } else {
-                    attrValue = generateNamedAttributeValue(attr
-                            .getNamedAttributeNode());
+                    attrValue = generateNamedAttributeValue(attr.getNamedAttributeNode());
                 }
             }
 
@@ -2810,8 +2673,7 @@ class Generator {
             } else {
                 m = handlerInfo.getSetterMethod(localName);
                 if (m == null) {
-                    err.jspError(n, "jsp.error.unable.to_find_method", attr
-                            .getName());
+                    err.jspError(n, "jsp.error.unable.to_find_method", attr.getName());
                 }
                 c = m.getParameterTypes();
                 // XXX assert(c.length > 0)
@@ -2820,8 +2682,7 @@ class Generator {
             if (attr.isExpression()) {
                 // Do nothing
             } else if (attr.isNamedAttribute()) {
-                if (!n.checkIfAttributeIsJspFragment(attr.getName())
-                        && !attr.isDynamic()) {
+                if (!n.checkIfAttributeIsJspFragment(attr.getName()) && !attr.isDynamic()) {
                     attrValue = stringInterpreter.convertString(c[0], attrValue, localName,
                             handlerInfo.getPropertyEditorClass(localName), true);
                 }
@@ -2860,8 +2721,8 @@ class Generator {
                 sb.setLength(0);
 
                 // depending on type
-                if (attr.isDeferredInput()
-                        || ((tai != null) && ValueExpression.class.getName().equals(tai.getTypeName()))) {
+                if (attr.isDeferredInput() ||
+                        ((tai != null) && ValueExpression.class.getName().equals(tai.getTypeName()))) {
                     sb.append("new org.apache.jasper.el.JspValueExpression(");
                     sb.append(quote(mark));
                     sb.append(",_jsp_getExpressionFactory().createValueExpression(");
@@ -2892,8 +2753,8 @@ class Generator {
                         sb.append(')');
                     }
                     attrValue = sb.toString();
-                } else if (attr.isDeferredMethodInput()
-                        || ((tai != null) && MethodExpression.class.getName().equals(tai.getTypeName()))) {
+                } else if (attr.isDeferredMethodInput() ||
+                        ((tai != null) && MethodExpression.class.getName().equals(tai.getTypeName()))) {
                     sb.append("new org.apache.jasper.el.JspMethodExpression(");
                     sb.append(quote(mark));
                     sb.append(",_jsp_getExpressionFactory().createMethodExpression(");
@@ -2920,8 +2781,7 @@ class Generator {
                     // Must be EL
                     // run attrValue through the expression interpreter
                     String mapName = attr.getEL().getMapName();
-                    attrValue = elInterpreter.interpreterCall(ctxt,
-                            this.isTagFile, attrValue, c[0], mapName);
+                    attrValue = elInterpreter.interpreterCall(ctxt, this.isTagFile, attrValue, c[0], mapName);
                 }
             } else {
                 attrValue = stringInterpreter.convertString(c[0], attrValue, localName,
@@ -2935,8 +2795,7 @@ class Generator {
          *
          * @return the name of the map
          */
-        private String generateAliasMap(Node.CustomTag n,
-                String tagHandlerVar) {
+        private String generateAliasMap(Node.CustomTag n, String tagHandlerVar) {
 
             TagVariableInfo[] tagVars = n.getTagVariableInfos();
             String aliasMapVar = null;
@@ -2965,9 +2824,8 @@ class Generator {
             return aliasMapVar;
         }
 
-        private void generateSetters(Node.CustomTag n, String tagHandlerVar,
-                TagHandlerInfo handlerInfo, boolean simpleTag)
-                throws JasperException {
+        private void generateSetters(Node.CustomTag n, String tagHandlerVar, TagHandlerInfo handlerInfo,
+                boolean simpleTag) throws JasperException {
 
             // Set context
             if (simpleTag) {
@@ -3026,11 +2884,11 @@ class Generator {
             // need to handle deferred values and methods
             Node.JspAttribute[] attrs = n.getJspAttributes();
             for (int i = 0; attrs != null && i < attrs.length; i++) {
-                String attrValue = evaluateAttribute(handlerInfo, attrs[i], n,
-                        tagHandlerVar);
+                String attrValue = evaluateAttribute(handlerInfo, attrs[i], n, tagHandlerVar);
 
                 Mark m = n.getStart();
-                out.printil("// "+m.getFile()+"("+m.getLineNumber()+","+m.getColumnNumber()+") "+ attrs[i].getTagAttributeInfo());
+                out.printil("// " + m.getFile() + "(" + m.getLineNumber() + "," + m.getColumnNumber() + ") " +
+                        attrs[i].getTagAttributeInfo());
                 if (attrs[i].isDynamic()) {
                     out.printin(tagHandlerVar);
                     out.print(".");
@@ -3049,8 +2907,7 @@ class Generator {
                 } else {
                     out.printin(tagHandlerVar);
                     out.print(".");
-                    out.print(handlerInfo.getSetterMethod(
-                            attrs[i].getLocalName()).getName());
+                    out.print(handlerInfo.getSetterMethod(attrs[i].getLocalName()).getName());
                     out.print("(");
                     out.print(attrValue);
                     out.println(");");
@@ -3067,9 +2924,8 @@ class Generator {
         }
 
         /*
-         * Converts the scope string representation, whose possible values are
-         * "page", "request", "session", and "application", to the corresponding
-         * scope constant.
+         * Converts the scope string representation, whose possible values are "page", "request", "session", and
+         * "application", to the corresponding scope constant.
          */
         private String getScopeConstant(String scope) {
             String scopeName = "jakarta.servlet.jsp.PageContext.PAGE_SCOPE"; // Default to page
@@ -3086,8 +2942,7 @@ class Generator {
         }
 
         /**
-         * Generates anonymous JspFragment inner class which is passed as an
-         * argument to SimpleTag.setJspBody().
+         * Generates anonymous JspFragment inner class which is passed as an argument to SimpleTag.setJspBody().
          */
         private void generateJspFragment(ChildInfoBase n, String tagHandlerVar) throws JasperException {
             // XXX - A possible optimization here would be to check to see
@@ -3096,8 +2951,7 @@ class Generator {
             // generate a low-overhead JspFragment that just echoes its
             // body. The implementation of this fragment can come from
             // the org.apache.jasper.runtime package as a support class.
-            FragmentHelperClass.Fragment fragment = fragmentHelperClass
-                    .openFragment(n, methodNesting);
+            FragmentHelperClass.Fragment fragment = fragmentHelperClass.openFragment(n, methodNesting);
             ServletWriter outSave = out;
             out = fragment.getGenBuffer().getOut();
             String tmpParent = parent;
@@ -3121,14 +2975,12 @@ class Generator {
             // XXX - Need to change pageContext to jspContext if
             // we're not in a place where pageContext is defined (e.g.
             // in a fragment or in a tag file.
-            out.print("new " + fragmentHelperClass.getClassName() + "( "
-                    + fragment.getId() + ", _jspx_page_context, "
-                    + tagHandlerVar + ", " + pushBodyCountVar + ")");
+            out.print("new " + fragmentHelperClass.getClassName() + "( " + fragment.getId() + ", _jspx_page_context, " +
+                    tagHandlerVar + ", " + pushBodyCountVar + ")");
         }
 
         /**
-         * Generate the code required to obtain the runtime value of the given
-         * named attribute.
+         * Generate the code required to obtain the runtime value of the given named attribute.
          *
          * @param n The named attribute node whose value is required
          *
@@ -3136,8 +2988,7 @@ class Generator {
          *
          * @throws JasperException If an error
          */
-        public String generateNamedAttributeValue(Node.NamedAttribute n)
-                throws JasperException {
+        public String generateNamedAttributeValue(Node.NamedAttribute n) throws JasperException {
 
             String varName = n.getTemporaryVariableName();
 
@@ -3153,10 +3004,7 @@ class Generator {
                     Node bodyElement = body.getNode(0);
                     if (bodyElement instanceof Node.TemplateText) {
                         templateTextOptimization = true;
-                        out.printil("java.lang.String "
-                                + varName
-                                + " = "
-                                + quote(bodyElement.getText()) + ";");
+                        out.printil("java.lang.String " + varName + " = " + quote(bodyElement.getText()) + ";");
                     }
                 }
 
@@ -3166,9 +3014,8 @@ class Generator {
                 if (!templateTextOptimization) {
                     out.printil("out = _jspx_page_context.pushBody();");
                     visitBody(n);
-                    out.printil("java.lang.String " + varName + " = "
-                            + "((jakarta.servlet.jsp.tagext.BodyContent)"
-                            + "out).getString();");
+                    out.printil("java.lang.String " + varName + " = " + "((jakarta.servlet.jsp.tagext.BodyContent)" +
+                            "out).getString();");
                     out.printil("out = _jspx_page_context.popBody();");
                 }
             } else {
@@ -3180,25 +3027,20 @@ class Generator {
         }
 
         /**
-         * Similar to generateNamedAttributeValue, but create a JspFragment
-         * instead.
+         * Similar to generateNamedAttributeValue, but create a JspFragment instead.
+         *
+         * @param n             The parent node of the named attribute
+         * @param tagHandlerVar The variable the tag handler is stored in, so the fragment knows its parent tag.
          *
-         * @param n
-         *            The parent node of the named attribute
-         * @param tagHandlerVar
-         *            The variable the tag handler is stored in, so the fragment
-         *            knows its parent tag.
          * @return The name of the temporary variable the fragment is stored in.
          *
-         * @throws JasperException If an error occurs trying to generate the
-         *         fragment
+         * @throws JasperException If an error occurs trying to generate the fragment
          */
-        public String generateNamedAttributeJspFragment(Node.NamedAttribute n,
-                String tagHandlerVar) throws JasperException {
+        public String generateNamedAttributeJspFragment(Node.NamedAttribute n, String tagHandlerVar)
+                throws JasperException {
             String varName = n.getTemporaryVariableName();
 
-            out.printin("jakarta.servlet.jsp.tagext.JspFragment " + varName
-                    + " = ");
+            out.printin("jakarta.servlet.jsp.tagext.JspFragment " + varName + " = ");
             generateJspFragment(n, tagHandlerVar);
             out.println(";");
 
@@ -3213,12 +3055,13 @@ class Generator {
             out.printil("jakarta.servlet.http.HttpSession session = _jspx_page_context.getSession();");
             out.printil("jakarta.servlet.ServletContext application = _jspx_page_context.getServletContext();");
         }
-        if (ci.hasUseBean() || ci.hasIncludeAction() || ci.hasSetProperty()
-                || ci.hasParamAction()) {
-            out.printil("jakarta.servlet.http.HttpServletRequest request = (jakarta.servlet.http.HttpServletRequest)_jspx_page_context.getRequest();");
+        if (ci.hasUseBean() || ci.hasIncludeAction() || ci.hasSetProperty() || ci.hasParamAction()) {
+            out.printil(
+                    "jakarta.servlet.http.HttpServletRequest request = (jakarta.servlet.http.HttpServletRequest)_jspx_page_context.getRequest();");
         }
         if (ci.hasIncludeAction()) {
-            out.printil("jakarta.servlet.http.HttpServletResponse response = (jakarta.servlet.http.HttpServletResponse)_jspx_page_context.getResponse();");
+            out.printil(
+                    "jakarta.servlet.http.HttpServletResponse response = (jakarta.servlet.http.HttpServletResponse)_jspx_page_context.getResponse();");
         }
     }
 
@@ -3308,32 +3151,27 @@ class Generator {
 
         ELInterpreter elInterpreter = null;
         try {
-            elInterpreter = ELInterpreterFactory.getELInterpreter(
-                    compiler.getCompilationContext().getServletContext());
+            elInterpreter = ELInterpreterFactory.getELInterpreter(compiler.getCompilationContext().getServletContext());
         } catch (Exception e) {
-            err.jspError("jsp.error.el_interpreter_class.instantiation",
-                    e.getMessage());
+            err.jspError("jsp.error.el_interpreter_class.instantiation", e.getMessage());
         }
         this.elInterpreter = elInterpreter;
 
         StringInterpreter stringInterpreter = null;
         try {
-            stringInterpreter = StringInterpreterFactory.getStringInterpreter(
-                    compiler.getCompilationContext().getServletContext());
+            stringInterpreter =
+                    StringInterpreterFactory.getStringInterpreter(compiler.getCompilationContext().getServletContext());
         } catch (Exception e) {
-            err.jspError("jsp.error.string_interpreter_class.instantiation",
-                    e.getMessage());
+            err.jspError("jsp.error.string_interpreter_class.instantiation", e.getMessage());
         }
         this.stringInterpreter = stringInterpreter;
 
         /*
-         * Temporary hack. If a JSP page uses the "extends" attribute of the
-         * page directive, the _jspInit() method of the generated servlet class
-         * will not be called (it is only called for those generated servlets
-         * that extend HttpJspBase, the default), causing the tag handler pools
-         * not to be initialized and resulting in a NPE. The JSP spec needs to
-         * clarify whether containers can override init() and destroy(). For
-         * now, we just disable tag pooling for pages that use "extends".
+         * Temporary hack. If a JSP page uses the "extends" attribute of the page directive, the _jspInit() method of
+         * the generated servlet class will not be called (it is only called for those generated servlets that extend
+         * HttpJspBase, the default), causing the tag handler pools not to be initialized and resulting in a NPE. The
+         * JSP spec needs to clarify whether containers can override init() and destroy(). For now, we just disable tag
+         * pooling for pages that use "extends".
          */
         if (pageInfo.getExtends(false) == null || ctxt.getOptions().getPoolTagsWithExtends()) {
             isPoolingEnabled = ctxt.getOptions().isPoolingEnabled();
@@ -3355,17 +3193,13 @@ class Generator {
     /**
      * The main entry for Generator.
      *
-     * @param out
-     *            The servlet output writer
-     * @param compiler
-     *            The compiler
-     * @param page
-     *            The input page
+     * @param out      The servlet output writer
+     * @param compiler The compiler
+     * @param page     The input page
      *
      * @throws JasperException If something goes wrong during generation
      */
-    public static void generate(ServletWriter out, Compiler compiler,
-            Node.Nodes page) throws JasperException {
+    public static void generate(ServletWriter out, Compiler compiler, Node.Nodes page) throws JasperException {
 
         Generator gen = new Generator(out, compiler);
 
@@ -3383,16 +3217,14 @@ class Generator {
 
             gen.generateXmlProlog(page);
             gen.fragmentHelperClass.generatePreamble();
-            page.visit(gen.new GenerateVisitor(gen.ctxt.isTagFile(), out,
-                    gen.methodsBuffered, gen.fragmentHelperClass,
+            page.visit(gen.new GenerateVisitor(gen.ctxt.isTagFile(), out, gen.methodsBuffered, gen.fragmentHelperClass,
                     gen.ctxt.getOptions().getUseInstanceManagerForTags()));
             gen.generateTagHandlerPostamble(tagInfo);
         } else {
             gen.generatePreamble(page);
             gen.generateXmlProlog(page);
             gen.fragmentHelperClass.generatePreamble();
-            page.visit(gen.new GenerateVisitor(gen.ctxt.isTagFile(), out,
-                    gen.methodsBuffered, gen.fragmentHelperClass,
+            page.visit(gen.new GenerateVisitor(gen.ctxt.isTagFile(), out, gen.methodsBuffered, gen.fragmentHelperClass,
                     gen.ctxt.getOptions().getUseInstanceManagerForTags()));
             gen.generatePostamble();
         }
@@ -3403,8 +3235,7 @@ class Generator {
         out.println(" * Generated by the Jasper component of Apache Tomcat");
         out.println(" * Version: " + ctxt.getServletContext().getServerInfo());
         if (ctxt.getOptions().getGeneratedJavaAddTimestamp()) {
-            out.println(" * Generated at: " + timestampFormat.format(new Date()) +
-                    " UTC");
+            out.println(" * Generated at: " + timestampFormat.format(new Date()) + " UTC");
         }
         out.println(" * Note: The last modified time of this file was set to");
         out.println(" *       the last modified time of the source file after");
@@ -3415,8 +3246,7 @@ class Generator {
     /*
      * Generates tag handler preamble.
      */
-    private void generateTagHandlerPreamble(JasperTagInfo tagInfo,
-            Node.Nodes tag) throws JasperException {
+    private void generateTagHandlerPreamble(JasperTagInfo tagInfo, Node.Nodes tag) throws JasperException {
 
         // Generate package declaration
         String className = tagInfo.getTagClassName();
@@ -3485,17 +3315,17 @@ class Generator {
         out.pushIndent();
 
         /*
-         * According to the spec, 'pageContext' must not be made available as an
-         * implicit object in tag files. Declare _jspx_page_context, so we can
-         * share the code generator with JSPs.
+         * According to the spec, 'pageContext' must not be made available as an implicit object in tag files. Declare
+         * _jspx_page_context, so we can share the code generator with JSPs.
          */
-        out.printil("jakarta.servlet.jsp.PageContext _jspx_page_context = (jakarta.servlet.jsp.PageContext)jspContext;");
+        out.printil(
+                "jakarta.servlet.jsp.PageContext _jspx_page_context = (jakarta.servlet.jsp.PageContext)jspContext;");
 
         // Declare implicit objects.
-        out.printil("jakarta.servlet.http.HttpServletRequest request = "
-                + "(jakarta.servlet.http.HttpServletRequest) _jspx_page_context.getRequest();");
-        out.printil("jakarta.servlet.http.HttpServletResponse response = "
-                + "(jakarta.servlet.http.HttpServletResponse) _jspx_page_context.getResponse();");
+        out.printil("jakarta.servlet.http.HttpServletRequest request = " +
+                "(jakarta.servlet.http.HttpServletRequest) _jspx_page_context.getRequest();");
+        out.printil("jakarta.servlet.http.HttpServletResponse response = " +
+                "(jakarta.servlet.http.HttpServletResponse) _jspx_page_context.getResponse();");
         out.printil("jakarta.servlet.http.HttpSession session = _jspx_page_context.getSession();");
         out.printil("jakarta.servlet.ServletContext application = _jspx_page_context.getServletContext();");
         out.printil("jakarta.servlet.ServletConfig config = _jspx_page_context.getServletConfig();");
@@ -3547,7 +3377,8 @@ class Generator {
         }
 
         // restore nested JspContext on ELContext
-        out.printil("jspContext.getELContext().putContext(jakarta.servlet.jsp.JspContext.class,super.getJspContext());");
+        out.printil(
+                "jspContext.getELContext().putContext(jakarta.servlet.jsp.JspContext.class,super.getJspContext());");
 
         out.printil("((org.apache.jasper.runtime.JspContextWrapper) jspContext).syncEndTagFile();");
         if (isPoolingEnabled && !tagHandlerPoolNames.isEmpty()) {
@@ -3565,8 +3396,7 @@ class Generator {
     }
 
     /**
-     * Generates declarations for tag handler attributes, and defines the getter
-     * and setter methods for each.
+     * Generates declarations for tag handler attributes, and defines the getter and setter methods for each.
      */
     private void generateTagHandlerAttributes(TagInfo tagInfo) {
 
@@ -3584,16 +3414,14 @@ class Generator {
                 out.print(JspUtil.toJavaSourceType(info.getTypeName()));
                 out.print(" ");
             }
-            out.print(JspUtil.makeJavaIdentifierForAttribute(
-                    info.getName()));
+            out.print(JspUtil.makeJavaIdentifierForAttribute(info.getName()));
             out.println(";");
         }
         out.println();
 
         // Define attribute getter and setter methods
         for (TagAttributeInfo attrInfo : attrInfos) {
-            String javaName =
-                    JspUtil.makeJavaIdentifierForAttribute(attrInfo.getName());
+            String javaName = JspUtil.makeJavaIdentifierForAttribute(attrInfo.getName());
 
             // getter method
             out.printin("public ");
@@ -3645,10 +3473,9 @@ class Generator {
     }
 
     /*
-     * Generate setter for JspContext so we can create a wrapper and store both
-     * the original and the wrapper. We need the wrapper to mask the page
-     * context from the tag file and simulate a fresh page context. We need the
-     * original to do things like sync AT_BEGIN and AT_END scripting variables.
+     * Generate setter for JspContext so we can create a wrapper and store both the original and the wrapper. We need
+     * the wrapper to mask the page context from the tag file and simulate a fresh page context. We need the original to
+     * do things like sync AT_BEGIN and AT_END scripting variables.
      */
     private void generateSetJspContext(TagInfo tagInfo) {
 
@@ -3711,9 +3538,11 @@ class Generator {
             out.println(");");
         }
         if (aliasSeen) {
-            out.printil("this.jspContext = new org.apache.jasper.runtime.JspContextWrapper(this, ctx, _jspx_nested, _jspx_at_begin, _jspx_at_end, aliasMap);");
+            out.printil(
+                    "this.jspContext = new org.apache.jasper.runtime.JspContextWrapper(this, ctx, _jspx_nested, _jspx_at_begin, _jspx_at_end, aliasMap);");
         } else {
-            out.printil("this.jspContext = new org.apache.jasper.runtime.JspContextWrapper(this, ctx, _jspx_nested, _jspx_at_begin, _jspx_at_end, null);");
+            out.printil(
+                    "this.jspContext = new org.apache.jasper.runtime.JspContextWrapper(this, ctx, _jspx_nested, _jspx_at_begin, _jspx_at_end, null);");
         }
         out.popIndent();
         out.printil("}");
@@ -3726,17 +3555,16 @@ class Generator {
     }
 
     /*
-     * Generates implementation of
-     * jakarta.servlet.jsp.tagext.DynamicAttributes.setDynamicAttribute() method,
-     * which saves each dynamic attribute that is passed in so that a scoped
-     * variable can later be created for it.
+     * Generates implementation of jakarta.servlet.jsp.tagext.DynamicAttributes.setDynamicAttribute() method, which
+     * saves each dynamic attribute that is passed in so that a scoped variable can later be created for it.
      */
     public void generateSetDynamicAttribute() {
-        out.printil("public void setDynamicAttribute(java.lang.String uri, java.lang.String localName, java.lang.Object value) throws jakarta.servlet.jsp.JspException {");
+        out.printil(
+                "public void setDynamicAttribute(java.lang.String uri, java.lang.String localName, java.lang.Object value) throws jakarta.servlet.jsp.JspException {");
         out.pushIndent();
         /*
-         * According to the spec, only dynamic attributes with no uri are to be
-         * present in the Map; all other dynamic attributes are ignored.
+         * According to the spec, only dynamic attributes with no uri are to be present in the Map; all other dynamic
+         * attributes are ignored.
          */
         out.printil("if (uri == null)");
         out.pushIndent();
@@ -3747,9 +3575,8 @@ class Generator {
     }
 
     /*
-     * Creates a page-scoped variable for each declared tag attribute. Also, if
-     * the tag accepts dynamic attributes, a page-scoped variable is made
-     * available for each dynamic attribute that was passed in.
+     * Creates a page-scoped variable for each declared tag attribute. Also, if the tag accepts dynamic attributes, a
+     * page-scoped variable is made available for each dynamic attribute that was passed in.
      */
     private void generatePageScopedVariables(JasperTagInfo tagInfo) {
 
@@ -3765,7 +3592,8 @@ class Generator {
 
                 // we need to scope the modified VariableMapper for consistency and performance
                 if (!variableMapperVar) {
-                    out.printil("jakarta.el.VariableMapper _el_variablemapper = jspContext.getELContext().getVariableMapper();");
+                    out.printil(
+                            "jakarta.el.VariableMapper _el_variablemapper = jspContext.getELContext().getVariableMapper();");
                     variableMapperVar = true;
                 }
 
@@ -3825,25 +3653,20 @@ class Generator {
      */
     private static class TagHandlerInfo {
 
-        private Map<String, Method> methodMaps;
+        private Map<String,Method> methodMaps;
 
-        private Map<String, Class<?>> propertyEditorMaps;
+        private Map<String,Class<?>> propertyEditorMaps;
 
         private Class<?> tagHandlerClass;
 
         /**
          * Constructor.
          *
-         * @param n
-         *            The custom tag whose tag handler class is to be
-         *            introspected
-         * @param tagHandlerClass
-         *            Tag handler class
-         * @param err
-         *            Error dispatcher
+         * @param n               The custom tag whose tag handler class is to be introspected
+         * @param tagHandlerClass Tag handler class
+         * @param err             Error dispatcher
          */
-        TagHandlerInfo(Node n, Class<?> tagHandlerClass,
-                ErrorDispatcher err) throws JasperException {
+        TagHandlerInfo(Node n, Class<?> tagHandlerClass, ErrorDispatcher err) throws JasperException {
             this.tagHandlerClass = tagHandlerClass;
             this.methodMaps = new HashMap<>();
             this.propertyEditorMaps = new HashMap<>();
@@ -3853,15 +3676,14 @@ class Generator {
                 PropertyDescriptor[] pd = tagClassInfo.getPropertyDescriptors();
                 for (PropertyDescriptor propertyDescriptor : pd) {
                     /*
-                     * FIXME: should probably be checking for things like
-                     * pageContext, bodyContent, and parent here -akv
+                     * FIXME: should probably be checking for things like pageContext, bodyContent, and parent here -akv
                      */
                     if (propertyDescriptor.getWriteMethod() != null) {
                         methodMaps.put(propertyDescriptor.getName(), propertyDescriptor.getWriteMethod());
                     }
                     if (propertyDescriptor.getPropertyEditorClass() != null) {
-                        propertyEditorMaps.put(propertyDescriptor.getName(), propertyDescriptor
-                                .getPropertyEditorClass());
+                        propertyEditorMaps.put(propertyDescriptor.getName(),
+                                propertyDescriptor.getPropertyEditorClass());
                     }
                 }
             } catch (IntrospectionException ie) {
@@ -3888,15 +3710,14 @@ class Generator {
     }
 
     /**
-     * A class for generating codes to a buffer. Included here are some support
-     * for tracking source to Java lines mapping.
+     * A class for generating codes to a buffer. Included here are some support for tracking source to Java lines
+     * mapping.
      */
     private static class GenBuffer {
 
         /*
-         * For a CustomTag, the codes that are generated at the beginning of the
-         * tag may not be in the same buffer as those for the body of the tag.
-         * Two fields are used here to keep this straight. For codes that do not
+         * For a CustomTag, the codes that are generated at the beginning of the tag may not be in the same buffer as
+         * those for the body of the tag. Two fields are used here to keep this straight. For codes that do not
          * corresponds to any JSP lines, they should be null.
          */
         private Node node;
@@ -3931,12 +3752,10 @@ class Generator {
         }
 
         /**
-         * Adjust the Java Lines. This is necessary because the Java lines
-         * stored with the nodes are relative the beginning of this buffer and
-         * need to be adjusted when this buffer is inserted into the source.
+         * Adjust the Java Lines. This is necessary because the Java lines stored with the nodes are relative the
+         * beginning of this buffer and need to be adjusted when this buffer is inserted into the source.
          *
-         * @param offset The offset to apply to the start line and end line of
-         *        and Java lines of nodes in this buffer
+         * @param offset The offset to apply to the start line and end line of and Java lines of nodes in this buffer
          */
         public void adjustJavaLines(final int offset) {
 
@@ -3954,8 +3773,7 @@ class Generator {
                         }
 
                         @Override
-                        public void visit(Node.CustomTag n)
-                                throws JasperException {
+                        public void visit(Node.CustomTag n) throws JasperException {
                             Node.Nodes b = n.getBody();
                             if (b != null && !b.isGeneratedInBuffer()) {
                                 // Don't adjust lines for the nested tags that
@@ -4032,17 +3850,14 @@ class Generator {
             // Note: cannot be static, as we need to reference things like
             // _jspx_meth_*
             out.printil("private class " + className);
-            out.printil("    extends "
-                    + "org.apache.jasper.runtime.JspFragmentHelper");
+            out.printil("    extends " + "org.apache.jasper.runtime.JspFragmentHelper");
             out.printil("{");
             out.pushIndent();
             out.printil("private jakarta.servlet.jsp.tagext.JspTag _jspx_parent;");
             out.printil("private int[] _jspx_push_body_count;");
             out.println();
-            out.printil("public " + className
-                    + "( int discriminator, jakarta.servlet.jsp.JspContext jspContext, "
-                    + "jakarta.servlet.jsp.tagext.JspTag _jspx_parent, "
-                    + "int[] _jspx_push_body_count ) {");
+            out.printil("public " + className + "( int discriminator, jakarta.servlet.jsp.JspContext jspContext, " +
+                    "jakarta.servlet.jsp.tagext.JspTag _jspx_parent, " + "int[] _jspx_push_body_count ) {");
             out.pushIndent();
             out.printil("super( discriminator, jspContext, _jspx_parent );");
             out.printil("this._jspx_parent = _jspx_parent;");
@@ -4123,8 +3938,10 @@ class Generator {
             out.printil("}");
             out.printil("try {");
             out.pushIndent();
-            out.printil("Object _jspx_saved_JspContext = this.jspContext.getELContext().getContext(jakarta.servlet.jsp.JspContext.class);");
-            out.printil("this.jspContext.getELContext().putContext(jakarta.servlet.jsp.JspContext.class,this.jspContext);");
+            out.printil(
+                    "Object _jspx_saved_JspContext = this.jspContext.getELContext().getContext(jakarta.servlet.jsp.JspContext.class);");
+            out.printil(
+                    "this.jspContext.getELContext().putContext(jakarta.servlet.jsp.JspContext.class,this.jspContext);");
             out.printil("switch( this.discriminator ) {");
             out.pushIndent();
             for (int i = 0; i < fragments.size(); i++) {
@@ -4138,7 +3955,8 @@ class Generator {
             out.printil("}"); // switch
 
             // restore nested JspContext on ELContext
-            out.printil("jspContext.getELContext().putContext(jakarta.servlet.jsp.JspContext.class,_jspx_saved_JspContext);");
+            out.printil(
+                    "jspContext.getELContext().putContext(jakarta.servlet.jsp.JspContext.class,_jspx_saved_JspContext);");
 
             out.popIndent();
             out.printil("}"); // try
diff --git a/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java b/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
index 9d70eee31a..ab5a6114ab 100644
--- a/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
+++ b/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
@@ -42,9 +42,8 @@ import org.apache.tomcat.util.descriptor.tld.TldResourcePath;
 import org.xml.sax.SAXException;
 
 /**
- * Class responsible for generating an implicit tag library containing tag
- * handlers corresponding to the tag files in "/WEB-INF/tags/" or a
- * subdirectory of it.
+ * Class responsible for generating an implicit tag library containing tag handlers corresponding to the tag files in
+ * "/WEB-INF/tags/" or a subdirectory of it.
  *
  * @author Jan Luehe
  */
@@ -66,11 +65,7 @@ class ImplicitTagLibraryInfo extends TagLibraryInfo {
     private final List<TagFileInfo> list;
 
 
-    ImplicitTagLibraryInfo(JspCompilationContext ctxt,
-            ParserController pc,
-            PageInfo pi,
-            String prefix,
-            String tagdir,
+    ImplicitTagLibraryInfo(JspCompilationContext ctxt, ParserController pc, PageInfo pi, String prefix, String tagdir,
             ErrorDispatcher err) throws JasperException {
         super(prefix, null);
         this.pc = pc;
@@ -90,8 +85,7 @@ class ImplicitTagLibraryInfo extends TagLibraryInfo {
 
         // Determine the value of the <short-name> subelement of the
         // "imaginary" <taglib> element
-        if (tagdir.equals(WEB_INF_TAGS)
-                || tagdir.equals( WEB_INF_TAGS + "/")) {
+        if (tagdir.equals(WEB_INF_TAGS) || tagdir.equals(WEB_INF_TAGS + "/")) {
             shortname = TAGS_SHORTNAME;
         } else {
             shortname = tagdir.substring(WEB_INF_TAGS.length());
@@ -102,18 +96,14 @@ class ImplicitTagLibraryInfo extends TagLibraryInfo {
         Set<String> dirList = ctxt.getResourcePaths(tagdir);
         if (dirList != null) {
             for (String path : dirList) {
-                if (path.endsWith(TAG_FILE_SUFFIX)
-                        || path.endsWith(TAGX_FILE_SUFFIX)) {
+                if (path.endsWith(TAG_FILE_SUFFIX) || path.endsWith(TAGX_FILE_SUFFIX)) {
                     /*
-                     * Use the filename of the tag file, without the .tag or
-                     * .tagx extension, respectively, as the <name> subelement
-                     * of the "imaginary" <tag-file> element
+                     * Use the filename of the tag file, without the .tag or .tagx extension, respectively, as the
+                     * <name> subelement of the "imaginary" <tag-file> element
                      */
-                    String suffix = path.endsWith(TAG_FILE_SUFFIX) ?
-                            TAG_FILE_SUFFIX : TAGX_FILE_SUFFIX;
+                    String suffix = path.endsWith(TAG_FILE_SUFFIX) ? TAG_FILE_SUFFIX : TAGX_FILE_SUFFIX;
                     String tagName = path.substring(path.lastIndexOf('/') + 1);
-                    tagName = tagName.substring(0,
-                            tagName.lastIndexOf(suffix));
+                    tagName = tagName.substring(0, tagName.lastIndexOf(suffix));
                     tagFileMap.put(tagName, path);
                 } else if (path.endsWith(IMPLICIT_TLD)) {
                     TaglibXml taglibXml;
@@ -121,19 +111,17 @@ class ImplicitTagLibraryInfo extends TagLibraryInfo {
                         URL url = ctxt.getResource(path);
                         TldResourcePath resourcePath = new TldResourcePath(url, path);
                         ServletContext servletContext = ctxt.getServletContext();
-                        boolean validate = Boolean.parseBoolean(
-                                servletContext.getInitParameter(
-                                        Constants.XML_VALIDATION_TLD_INIT_PARAM));
-                        String blockExternalString = servletContext.getInitParameter(
-                                Constants.XML_BLOCK_EXTERNAL_INIT_PARAM);
+                        boolean validate = Boolean
+                                .parseBoolean(servletContext.getInitParameter(Constants.XML_VALIDATION_TLD_INIT_PARAM));
+                        String blockExternalString =
+                                servletContext.getInitParameter(Constants.XML_BLOCK_EXTERNAL_INIT_PARAM);
                         boolean blockExternal;
                         if (blockExternalString == null) {
                             blockExternal = true;
                         } else {
                             blockExternal = Boolean.parseBoolean(blockExternalString);
                         }
-                        TldParser parser = new TldParser(true, validate,
-                                new ImplicitTldRuleSet(), blockExternal);
+                        TldParser parser = new TldParser(true, validate, new ImplicitTldRuleSet(), blockExternal);
                         taglibXml = parser.parse(resourcePath);
                     } catch (IOException | SAXException e) {
                         err.jspError(e);
@@ -162,11 +150,10 @@ class ImplicitTagLibraryInfo extends TagLibraryInfo {
     }
 
     /**
-     * Checks to see if the given tag name maps to a tag file path,
-     * and if so, parses the corresponding tag file.
+     * Checks to see if the given tag name maps to a tag file path, and if so, parses the corresponding tag file.
      *
-     * @return The TagFileInfo corresponding to the given tag name, or null if
-     * the given tag name is not implemented as a tag file
+     * @return The TagFileInfo corresponding to the given tag name, or null if the given tag name is not implemented as
+     *             a tag file
      */
     @Override
     public TagFileInfo getTagFile(String shortName) {
diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java b/java/org/apache/jasper/compiler/JDTCompiler.java
index 67fa51bbde..9e249aa740 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -54,11 +54,8 @@ import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
 
 /**
- * JDT class compiler. This compiler will load source dependencies from the
- * context classloader, reducing dramatically disk access during
- * the compilation process.
- *
- * Based on code from Cocoon2.
+ * JDT class compiler. This compiler will load source dependencies from the context classloader, reducing dramatically
+ * disk access during the compilation process. Based on code from Cocoon2.
  *
  * @author Remy Maucherat
  */
@@ -68,7 +65,7 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
 
     @Override
     protected void generateClass(Map<String,SmapStratum> smaps)
-        throws FileNotFoundException, JasperException, Exception {
+            throws FileNotFoundException, JasperException, Exception {
 
         long t1 = 0;
         if (log.isDebugEnabled()) {
@@ -81,8 +78,8 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
         final String targetClassName =
                 ((packageName.length() != 0) ? (packageName + ".") : "") + ctxt.getServletClassName();
         final ClassLoader classLoader = ctxt.getJspLoader();
-        String[] fileNames = new String[] {sourceFile};
-        String[] classNames = new String[] {targetClassName};
+        String[] fileNames = new String[] { sourceFile };
+        String[] classNames = new String[] { targetClassName };
         final List<JavacErrorDetail> problemList = new ArrayList<>();
 
         class CompilationUnit implements ICompilationUnit {
@@ -132,7 +129,7 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
             @Override
             public char[][] getPackageName() {
                 StringTokenizer izer = new StringTokenizer(className, ".");
-                char[][] result = new char[izer.countTokens()-1][];
+                char[][] result = new char[izer.countTokens() - 1][];
                 for (int i = 0; i < result.length; i++) {
                     String tok = izer.nextToken();
                     result[i] = tok.toCharArray();
@@ -148,169 +145,163 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
 
         final INameEnvironment env = new INameEnvironment() {
 
-                @Override
-                public NameEnvironmentAnswer findType(char[][] compoundTypeName) {
-                    StringBuilder result = new StringBuilder();
-                    for (int i = 0; i < compoundTypeName.length; i++) {
-                        if (i > 0) {
-                            result.append('.');
-                        }
-                        result.append(compoundTypeName[i]);
+            @Override
+            public NameEnvironmentAnswer findType(char[][] compoundTypeName) {
+                StringBuilder result = new StringBuilder();
+                for (int i = 0; i < compoundTypeName.length; i++) {
+                    if (i > 0) {
+                        result.append('.');
                     }
-                    return findType(result.toString());
+                    result.append(compoundTypeName[i]);
                 }
+                return findType(result.toString());
+            }
 
-                @Override
-                public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName) {
-                    StringBuilder result = new StringBuilder();
-                    int i=0;
-                    for (; i < packageName.length; i++) {
-                        if (i > 0) {
-                            result.append('.');
-                        }
-                        result.append(packageName[i]);
-                    }
+            @Override
+            public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName) {
+                StringBuilder result = new StringBuilder();
+                int i = 0;
+                for (; i < packageName.length; i++) {
                     if (i > 0) {
                         result.append('.');
                     }
-                    result.append(typeName);
-                    return findType(result.toString());
+                    result.append(packageName[i]);
                 }
+                if (i > 0) {
+                    result.append('.');
+                }
+                result.append(typeName);
+                return findType(result.toString());
+            }
 
-                private NameEnvironmentAnswer findType(String className) {
+            private NameEnvironmentAnswer findType(String className) {
 
-                    if (className.equals(targetClassName)) {
-                        ICompilationUnit compilationUnit = new CompilationUnit(sourceFile, className);
-                        return new NameEnvironmentAnswer(compilationUnit, null);
-                    }
+                if (className.equals(targetClassName)) {
+                    ICompilationUnit compilationUnit = new CompilationUnit(sourceFile, className);
+                    return new NameEnvironmentAnswer(compilationUnit, null);
+                }
 
-                    String resourceName = className.replace('.', '/') + ".class";
+                String resourceName = className.replace('.', '/') + ".class";
 
-                    try (InputStream is = classLoader.getResourceAsStream(resourceName)) {
-                        if (is != null) {
-                            byte[] classBytes;
-                            byte[] buf = new byte[8192];
-                            ByteArrayOutputStream baos = new ByteArrayOutputStream(buf.length);
-                            int count;
-                            while ((count = is.read(buf, 0, buf.length)) > 0) {
-                                baos.write(buf, 0, count);
-                            }
-                            baos.flush();
-                            classBytes = baos.toByteArray();
-                            char[] fileName = className.toCharArray();
-                            ClassFileReader classFileReader = new ClassFileReader(classBytes, fileName, true);
-                            return new NameEnvironmentAnswer(classFileReader, null);
+                try (InputStream is = classLoader.getResourceAsStream(resourceName)) {
+                    if (is != null) {
+                        byte[] classBytes;
+                        byte[] buf = new byte[8192];
+                        ByteArrayOutputStream baos = new ByteArrayOutputStream(buf.length);
+                        int count;
+                        while ((count = is.read(buf, 0, buf.length)) > 0) {
+                            baos.write(buf, 0, count);
                         }
-                    } catch (IOException | ClassFormatException exc) {
-                        log.error(Localizer.getMessage("jsp.error.compilation.dependent", className), exc);
+                        baos.flush();
+                        classBytes = baos.toByteArray();
+                        char[] fileName = className.toCharArray();
+                        ClassFileReader classFileReader = new ClassFileReader(classBytes, fileName, true);
+                        return new NameEnvironmentAnswer(classFileReader, null);
                     }
-                    return null;
+                } catch (IOException | ClassFormatException exc) {
+                    log.error(Localizer.getMessage("jsp.error.compilation.dependent", className), exc);
                 }
+                return null;
+            }
 
-                private boolean isPackage(String result) {
-                    if (result.equals(targetClassName) || result.startsWith(targetClassName + '$')) {
-                        return false;
-                    }
-                    String resourceName = result.replace('.', '/') + ".class";
-                    try (InputStream is =
-                        classLoader.getResourceAsStream(resourceName)) {
-                        return is == null;
-                    } catch (IOException e) {
-                        // we are here, since close on is failed. That means it was not null
-                        return false;
-                    }
+            private boolean isPackage(String result) {
+                if (result.equals(targetClassName) || result.startsWith(targetClassName + '$')) {
+                    return false;
+                }
+                String resourceName = result.replace('.', '/') + ".class";
+                try (InputStream is = classLoader.getResourceAsStream(resourceName)) {
+                    return is == null;
+                } catch (IOException e) {
+                    // we are here, since close on is failed. That means it was not null
+                    return false;
                 }
+            }
 
-                @Override
-                public boolean isPackage(char[][] parentPackageName, char[] packageName) {
-                    StringBuilder result = new StringBuilder();
-                    int i = 0;
-                    if (parentPackageName != null) {
-                        for (; i < parentPackageName.length; i++) {
-                            if (i > 0) {
-                                result.append('.');
-                            }
-                            result.append(parentPackageName[i]);
+            @Override
+            public boolean isPackage(char[][] parentPackageName, char[] packageName) {
+                StringBuilder result = new StringBuilder();
+                int i = 0;
+                if (parentPackageName != null) {
+                    for (; i < parentPackageName.length; i++) {
+                        if (i > 0) {
+                            result.append('.');
                         }
+                        result.append(parentPackageName[i]);
                     }
+                }
 
-                    if (Character.isUpperCase(packageName[0])) {
-                        if (!isPackage(result.toString())) {
-                            return false;
-                        }
-                    }
-                    if (i > 0) {
-                        result.append('.');
+                if (Character.isUpperCase(packageName[0])) {
+                    if (!isPackage(result.toString())) {
+                        return false;
                     }
-                    result.append(packageName);
-
-                    return isPackage(result.toString());
                 }
-
-                @Override
-                public void cleanup() {
+                if (i > 0) {
+                    result.append('.');
                 }
+                result.append(packageName);
+
+                return isPackage(result.toString());
+            }
+
+            @Override
+            public void cleanup() {
+            }
 
-            };
+        };
 
         final IErrorHandlingPolicy policy = DefaultErrorHandlingPolicies.proceedWithAllProblems();
 
         final Map<String,String> settings = new HashMap<>();
-        settings.put(CompilerOptions.OPTION_LineNumberAttribute,
-                     CompilerOptions.GENERATE);
-        settings.put(CompilerOptions.OPTION_SourceFileAttribute,
-                     CompilerOptions.GENERATE);
-        settings.put(CompilerOptions.OPTION_ReportDeprecation,
-                     CompilerOptions.IGNORE);
+        settings.put(CompilerOptions.OPTION_LineNumberAttribute, CompilerOptions.GENERATE);
+        settings.put(CompilerOptions.OPTION_SourceFileAttribute, CompilerOptions.GENERATE);
+        settings.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.IGNORE);
         if (ctxt.getOptions().getJavaEncoding() != null) {
-            settings.put(CompilerOptions.OPTION_Encoding,
-                    ctxt.getOptions().getJavaEncoding());
+            settings.put(CompilerOptions.OPTION_Encoding, ctxt.getOptions().getJavaEncoding());
         }
         if (ctxt.getOptions().getClassDebugInfo()) {
-            settings.put(CompilerOptions.OPTION_LocalVariableAttribute,
-                         CompilerOptions.GENERATE);
+            settings.put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.GENERATE);
         }
 
         // Source JVM
-        if(ctxt.getOptions().getCompilerSourceVM() != null) {
+        if (ctxt.getOptions().getCompilerSourceVM() != null) {
             String opt = ctxt.getOptions().getCompilerSourceVM();
-            if(opt.equals("1.1")) {
+            if (opt.equals("1.1")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_1);
-            } else if(opt.equals("1.2")) {
+            } else if (opt.equals("1.2")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_2);
-            } else if(opt.equals("1.3")) {
+            } else if (opt.equals("1.3")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_3);
-            } else if(opt.equals("1.4")) {
+            } else if (opt.equals("1.4")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_4);
-            } else if(opt.equals("1.5")) {
+            } else if (opt.equals("1.5")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
-            } else if(opt.equals("1.6")) {
+            } else if (opt.equals("1.6")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6);
-            } else if(opt.equals("1.7")) {
+            } else if (opt.equals("1.7")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7);
-            } else if(opt.equals("1.8")) {
+            } else if (opt.equals("1.8")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
-            // Version format changed from Java 9 onwards.
-            // Support old format that was used in EA implementation as well
-            } else if(opt.equals("9") || opt.equals("1.9")) {
+                // Version format changed from Java 9 onwards.
+                // Support old format that was used in EA implementation as well
+            } else if (opt.equals("9") || opt.equals("1.9")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_9);
-            } else if(opt.equals("10")) {
+            } else if (opt.equals("10")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_10);
-            } else if(opt.equals("11")) {
+            } else if (opt.equals("11")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_11);
-            } else if(opt.equals("12")) {
+            } else if (opt.equals("12")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_12);
-            } else if(opt.equals("13")) {
+            } else if (opt.equals("13")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_13);
-            } else if(opt.equals("14")) {
+            } else if (opt.equals("14")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_14);
-            } else if(opt.equals("15")) {
+            } else if (opt.equals("15")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_15);
-            } else if(opt.equals("16")) {
+            } else if (opt.equals("16")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_16);
-            } else if(opt.equals("17")) {
+            } else if (opt.equals("17")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17);
-            } else if(opt.equals("18")) {
+            } else if (opt.equals("18")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_18);
             } else if (opt.equals("19")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_19);
@@ -340,58 +331,58 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
         }
 
         // Target JVM
-        if(ctxt.getOptions().getCompilerTargetVM() != null) {
+        if (ctxt.getOptions().getCompilerTargetVM() != null) {
             String opt = ctxt.getOptions().getCompilerTargetVM();
-            if(opt.equals("1.1")) {
+            if (opt.equals("1.1")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_1);
-            } else if(opt.equals("1.2")) {
+            } else if (opt.equals("1.2")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_2);
-            } else if(opt.equals("1.3")) {
+            } else if (opt.equals("1.3")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_3);
-            } else if(opt.equals("1.4")) {
+            } else if (opt.equals("1.4")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_4);
-            } else if(opt.equals("1.5")) {
+            } else if (opt.equals("1.5")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5);
-            } else if(opt.equals("1.6")) {
+            } else if (opt.equals("1.6")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6);
-            } else if(opt.equals("1.7")) {
+            } else if (opt.equals("1.7")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_7);
-            } else if(opt.equals("1.8")) {
+            } else if (opt.equals("1.8")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
-            // Version format changed from Java 9 onwards.
-            // Support old format that was used in EA implementation as well
-            } else if(opt.equals("9") || opt.equals("1.9")) {
+                // Version format changed from Java 9 onwards.
+                // Support old format that was used in EA implementation as well
+            } else if (opt.equals("9") || opt.equals("1.9")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_9);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_9);
-            } else if(opt.equals("10")) {
+            } else if (opt.equals("10")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_10);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_10);
-            } else if(opt.equals("11")) {
+            } else if (opt.equals("11")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_11);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_11);
-            } else if(opt.equals("12")) {
+            } else if (opt.equals("12")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_12);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_12);
-            } else if(opt.equals("13")) {
+            } else if (opt.equals("13")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_13);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_13);
-            } else if(opt.equals("14")) {
+            } else if (opt.equals("14")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_14);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_14);
-            } else if(opt.equals("15")) {
+            } else if (opt.equals("15")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_15);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_15);
-            } else if(opt.equals("16")) {
+            } else if (opt.equals("16")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_16);
-            } else if(opt.equals("17")) {
+            } else if (opt.equals("17")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_17);
-            } else if(opt.equals("18")) {
+            } else if (opt.equals("18")) {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_18);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_18);
             } else if (opt.equals("19")) {
@@ -431,54 +422,50 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
         final IProblemFactory problemFactory = new DefaultProblemFactory(Locale.getDefault());
 
         final ICompilerRequestor requestor = new ICompilerRequestor() {
-                @Override
-                public void acceptResult(CompilationResult result) {
-                    try {
-                        if (result.hasProblems()) {
-                            IProblem[] problems = result.getProblems();
-                            for (IProblem problem : problems) {
-                                if (problem.isError()) {
-                                    String name =
-                                            new String(problem.getOriginatingFileName());
-                                    try {
-                                        problemList.add(ErrorDispatcher.createJavacError
-                                                (name, pageNodes, new StringBuilder(problem.getMessage()),
-                                                        problem.getSourceLineNumber(), ctxt));
-                                    } catch (JasperException e) {
-                                        log.error(Localizer.getMessage("jsp.error.compilation.jdtProblemError"), e);
-                                    }
+            @Override
+            public void acceptResult(CompilationResult result) {
+                try {
+                    if (result.hasProblems()) {
+                        IProblem[] problems = result.getProblems();
+                        for (IProblem problem : problems) {
+                            if (problem.isError()) {
+                                String name = new String(problem.getOriginatingFileName());
+                                try {
+                                    problemList.add(ErrorDispatcher.createJavacError(name, pageNodes,
+                                            new StringBuilder(problem.getMessage()), problem.getSourceLineNumber(),
+                                            ctxt));
+                                } catch (JasperException e) {
+                                    log.error(Localizer.getMessage("jsp.error.compilation.jdtProblemError"), e);
                                 }
                             }
                         }
-                        if (problemList.isEmpty()) {
-                            ClassFile[] classFiles = result.getClassFiles();
-                            for (ClassFile classFile : classFiles) {
-                                char[][] compoundName =
-                                        classFile.getCompoundName();
-                                StringBuilder classFileName = new StringBuilder(outputDir).append('/');
-                                for (int j = 0;
-                                     j < compoundName.length; j++) {
-                                    if (j > 0) {
-                                        classFileName.append('/');
-                                    }
-                                    classFileName.append(compoundName[j]);
-                                }
-                                byte[] bytes = classFile.getBytes();
-                                classFileName.append(".class");
-                                try (FileOutputStream fout = new FileOutputStream(classFileName.toString());
-                                        BufferedOutputStream bos = new BufferedOutputStream(fout)) {
-                                    bos.write(bytes);
+                    }
+                    if (problemList.isEmpty()) {
+                        ClassFile[] classFiles = result.getClassFiles();
+                        for (ClassFile classFile : classFiles) {
+                            char[][] compoundName = classFile.getCompoundName();
+                            StringBuilder classFileName = new StringBuilder(outputDir).append('/');
+                            for (int j = 0; j < compoundName.length; j++) {
+                                if (j > 0) {
+                                    classFileName.append('/');
                                 }
+                                classFileName.append(compoundName[j]);
+                            }
+                            byte[] bytes = classFile.getBytes();
+                            classFileName.append(".class");
+                            try (FileOutputStream fout = new FileOutputStream(classFileName.toString());
+                                    BufferedOutputStream bos = new BufferedOutputStream(fout)) {
+                                bos.write(bytes);
                             }
                         }
-                    } catch (IOException exc) {
-                        log.error(Localizer.getMessage("jsp.error.compilation.jdt"), exc);
                     }
+                } catch (IOException exc) {
+                    log.error(Localizer.getMessage("jsp.error.compilation.jdt"), exc);
                 }
-            };
+            }
+        };
 
-        ICompilationUnit[] compilationUnits =
-            new ICompilationUnit[classNames.length];
+        ICompilationUnit[] compilationUnits = new ICompilationUnit[classNames.length];
         for (int i = 0; i < compilationUnits.length; i++) {
             String className = classNames[i];
             compilationUnits[i] = new CompilationUnit(fileNames[i], className);
@@ -504,29 +491,23 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
         }
 
         cOptions.parseLiteralExpressionsAsConstants = true;
-        Compiler compiler = new Compiler(env,
-                                         policy,
-                                         cOptions,
-                                         requestor,
-                                         problemFactory);
+        Compiler compiler = new Compiler(env, policy, cOptions, requestor, problemFactory);
         compiler.compile(compilationUnits);
 
         if (!ctxt.keepGenerated()) {
             File javaFile = new File(ctxt.getServletJavaFileName());
             if (!javaFile.delete()) {
-                throw new JasperException(Localizer.getMessage(
-                        "jsp.warning.compiler.javafile.delete.fail", javaFile));
+                throw new JasperException(Localizer.getMessage("jsp.warning.compiler.javafile.delete.fail", javaFile));
             }
         }
 
         if (!problemList.isEmpty()) {
-            JavacErrorDetail[] jeds =
-                problemList.toArray(new JavacErrorDetail[0]);
+            JavacErrorDetail[] jeds = problemList.toArray(new JavacErrorDetail[0]);
             errDispatcher.javacError(jeds);
         }
 
-        if( log.isDebugEnabled() ) {
-            long t2=System.currentTimeMillis();
+        if (log.isDebugEnabled()) {
+            long t2 = System.currentTimeMillis();
             log.debug(Localizer.getMessage("jsp.compiled", ctxt.getServletJavaFileName(), Long.valueOf(t2 - t1)));
         }
 
@@ -535,7 +516,7 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
         }
 
         // JSR45 Support
-        if (! options.isSmapSuppressed()) {
+        if (!options.isSmapSuppressed()) {
             SmapUtil.installSmap(smaps);
         }
     }
diff --git a/java/org/apache/jasper/compiler/JarScannerFactory.java b/java/org/apache/jasper/compiler/JarScannerFactory.java
index b855d06c4a..02dc53ed72 100644
--- a/java/org/apache/jasper/compiler/JarScannerFactory.java
+++ b/java/org/apache/jasper/compiler/JarScannerFactory.java
@@ -22,8 +22,7 @@ import org.apache.tomcat.JarScanner;
 import org.apache.tomcat.util.scan.StandardJarScanner;
 
 /**
- * Provide a mechanism for Jasper to obtain a reference to the JarScanner
- * implementation.
+ * Provide a mechanism for Jasper to obtain a reference to the JarScanner implementation.
  */
 public class JarScannerFactory {
 
@@ -32,14 +31,15 @@ public class JarScannerFactory {
     }
 
     /**
-     * Obtain the {@link JarScanner} associated with the specified {@link
-     * ServletContext}. It is obtained via a context parameter.
+     * Obtain the {@link JarScanner} associated with the specified {@link ServletContext}. It is obtained via a context
+     * parameter.
+     *
      * @param ctxt The Servlet context
+     *
      * @return a scanner instance
      */
     public static JarScanner getJarScanner(ServletContext ctxt) {
-        JarScanner jarScanner =
-            (JarScanner) ctxt.getAttribute(JarScanner.class.getName());
+        JarScanner jarScanner = (JarScanner) ctxt.getAttribute(JarScanner.class.getName());
         if (jarScanner == null) {
             ctxt.log(Localizer.getMessage("jsp.warning.noJarScanner"));
             jarScanner = new StandardJarScanner();
diff --git a/java/org/apache/jasper/compiler/JasperTagInfo.java b/java/org/apache/jasper/compiler/JasperTagInfo.java
index 9d11b6180f..f92fcd2854 100644
--- a/java/org/apache/jasper/compiler/JasperTagInfo.java
+++ b/java/org/apache/jasper/compiler/JasperTagInfo.java
@@ -23,31 +23,20 @@ import jakarta.servlet.jsp.tagext.TagLibraryInfo;
 import jakarta.servlet.jsp.tagext.TagVariableInfo;
 
 /**
- * TagInfo extension used by tag handlers that are implemented via tag files.
- * This class provides access to the name of the Map used to store the
- * dynamic attribute names and values passed to the custom action invocation.
- * This information is used by the code generator.
+ * TagInfo extension used by tag handlers that are implemented via tag files. This class provides access to the name of
+ * the Map used to store the dynamic attribute names and values passed to the custom action invocation. This information
+ * is used by the code generator.
  */
 class JasperTagInfo extends TagInfo {
 
     private final String dynamicAttrsMapName;
 
-    JasperTagInfo(String tagName,
-            String tagClassName,
-            String bodyContent,
-            String infoString,
-            TagLibraryInfo taglib,
-            TagExtraInfo tagExtraInfo,
-            TagAttributeInfo[] attributeInfo,
-            String displayName,
-            String smallIcon,
-            String largeIcon,
-            TagVariableInfo[] tvi,
-            String mapName) {
-
-        super(tagName, tagClassName, bodyContent, infoString, taglib,
-                tagExtraInfo, attributeInfo, displayName, smallIcon, largeIcon,
-                tvi);
+    JasperTagInfo(String tagName, String tagClassName, String bodyContent, String infoString, TagLibraryInfo taglib,
+            TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, String displayName, String smallIcon,
+            String largeIcon, TagVariableInfo[] tvi, String mapName) {
+
+        super(tagName, tagClassName, bodyContent, infoString, taglib, tagExtraInfo, attributeInfo, displayName,
+                smallIcon, largeIcon, tvi);
 
         this.dynamicAttrsMapName = mapName;
     }
diff --git a/java/org/apache/jasper/compiler/JavacErrorDetail.java b/java/org/apache/jasper/compiler/JavacErrorDetail.java
index 9daab47d8e..f0e4fda0b1 100644
--- a/java/org/apache/jasper/compiler/JavacErrorDetail.java
+++ b/java/org/apache/jasper/compiler/JavacErrorDetail.java
@@ -45,14 +45,11 @@ public class JavacErrorDetail {
     /**
      * Constructor.
      *
-     * @param javaFileName The name of the Java file in which the
-     * compilation error occurred
-     * @param javaLineNum The compilation error line number
-     * @param errMsg The compilation error message
+     * @param javaFileName The name of the Java file in which the compilation error occurred
+     * @param javaLineNum  The compilation error line number
+     * @param errMsg       The compilation error message
      */
-    public JavacErrorDetail(String javaFileName,
-                            int javaLineNum,
-                            StringBuilder errMsg) {
+    public JavacErrorDetail(String javaFileName, int javaLineNum, StringBuilder errMsg) {
 
         this(javaFileName, javaLineNum, null, -1, errMsg, null);
     }
@@ -60,29 +57,22 @@ public class JavacErrorDetail {
     /**
      * Constructor.
      *
-     * @param javaFileName The name of the Java file in which the
-     * compilation error occurred
-     * @param javaLineNum The compilation error line number
-     * @param jspFileName The name of the JSP file from which the Java source
-     * file was generated
-     * @param jspBeginLineNum The start line number of the JSP element
-     * responsible for the compilation error
-     * @param errMsg The compilation error message
-     * @param ctxt The compilation context
+     * @param javaFileName    The name of the Java file in which the compilation error occurred
+     * @param javaLineNum     The compilation error line number
+     * @param jspFileName     The name of the JSP file from which the Java source file was generated
+     * @param jspBeginLineNum The start line number of the JSP element responsible for the compilation error
+     * @param errMsg          The compilation error message
+     * @param ctxt            The compilation context
      */
-    public JavacErrorDetail(String javaFileName,
-            int javaLineNum,
-            String jspFileName,
-            int jspBeginLineNum,
-            StringBuilder errMsg,
-            JspCompilationContext ctxt) {
+    public JavacErrorDetail(String javaFileName, int javaLineNum, String jspFileName, int jspBeginLineNum,
+            StringBuilder errMsg, JspCompilationContext ctxt) {
 
         this.javaFileName = javaFileName;
         this.javaLineNum = javaLineNum;
         this.errMsg = errMsg;
         this.jspFileName = jspFileName;
         // Note: this.jspBeginLineNum is set at the end of this method as it may
-        //       be modified (corrected) during the execution of this method
+        // be modified (corrected) during the execution of this method
 
         if (jspBeginLineNum > 0 && ctxt != null) {
             InputStream is = null;
@@ -111,15 +101,15 @@ public class JavacErrorDetail {
 
                     // If the line contains the opening of a multi-line scriptlet
                     // block, then the JSP line number we got back is probably
-                    // faulty.  Scan forward to match the java line...
-                    if (jspLines[jspBeginLineNum-1].lastIndexOf("<%") >
-                        jspLines[jspBeginLineNum-1].lastIndexOf("%>")) {
-                        String javaLine = javaLines[javaLineNum-1].trim();
+                    // faulty. Scan forward to match the java line...
+                    if (jspLines[jspBeginLineNum - 1].lastIndexOf("<%") > jspLines[jspBeginLineNum - 1]
+                            .lastIndexOf("%>")) {
+                        String javaLine = javaLines[javaLineNum - 1].trim();
 
-                        for (int i=jspBeginLineNum-1; i<jspLines.length; i++) {
+                        for (int i = jspBeginLineNum - 1; i < jspLines.length; i++) {
                             if (jspLines[i].contains(javaLine)) {
                                 // Update jsp line number
-                                jspBeginLineNum = i+1;
+                                jspBeginLineNum = i + 1;
                                 break;
                             }
                         }
@@ -127,12 +117,11 @@ public class JavacErrorDetail {
 
                     // copy out a fragment of JSP to display to the user
                     StringBuilder fragment = new StringBuilder(1024);
-                    int startIndex = Math.max(0, jspBeginLineNum-1-3);
-                    int endIndex = Math.min(
-                            jspLines.length-1, jspBeginLineNum-1+3);
+                    int startIndex = Math.max(0, jspBeginLineNum - 1 - 3);
+                    int endIndex = Math.min(jspLines.length - 1, jspBeginLineNum - 1 + 3);
 
-                    for (int i=startIndex;i<=endIndex; ++i) {
-                        fragment.append(i+1);
+                    for (int i = startIndex; i <= endIndex; ++i) {
+                        fragment.append(i + 1);
                         fragment.append(": ");
                         fragment.append(jspLines[i]);
                         fragment.append(System.lineSeparator());
@@ -155,8 +144,7 @@ public class JavacErrorDetail {
     }
 
     /**
-     * Gets the name of the Java source file in which the compilation error
-     * occurred.
+     * Gets the name of the Java source file in which the compilation error occurred.
      *
      * @return Java source file name
      */
@@ -174,8 +162,7 @@ public class JavacErrorDetail {
     }
 
     /**
-     * Gets the name of the JSP file from which the Java source file was
-     * generated.
+     * Gets the name of the JSP file from which the Java source file was generated.
      *
      * @return JSP file from which the Java source file was generated.
      */
@@ -184,11 +171,9 @@ public class JavacErrorDetail {
     }
 
     /**
-     * Gets the start line number (in the JSP file) of the JSP element
-     * responsible for the compilation error.
+     * Gets the start line number (in the JSP file) of the JSP element responsible for the compilation error.
      *
-     * @return Start line number of the JSP element responsible for the
-     * compilation error
+     * @return Start line number of the JSP element responsible for the compilation error
      */
     public int getJspBeginLineNumber() {
         return this.jspBeginLineNum;
@@ -213,15 +198,15 @@ public class JavacErrorDetail {
     }
 
     /**
-     * Reads a text file from an input stream into a String[]. Used to read in
-     * the JSP and generated Java file when generating error messages.
+     * Reads a text file from an input stream into a String[]. Used to read in the JSP and generated Java file when
+     * generating error messages.
      */
     private String[] readFile(InputStream s) throws IOException {
         BufferedReader reader = new BufferedReader(new InputStreamReader(s));
         List<String> lines = new ArrayList<>();
         String line;
 
-        while ( (line = reader.readLine()) != null ) {
+        while ((line = reader.readLine()) != null) {
             lines.add(line);
         }
 
diff --git a/java/org/apache/jasper/compiler/JspConfig.java b/java/org/apache/jasper/compiler/JspConfig.java
index 2eb20cba1b..915773c931 100644
--- a/java/org/apache/jasper/compiler/JspConfig.java
+++ b/java/org/apache/jasper/compiler/JspConfig.java
@@ -28,8 +28,8 @@ import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
 /**
- * Handles the jsp-config element in WEB_INF/web.xml.  This is used
- * for specifying the JSP configuration information on a JSP page
+ * Handles the jsp-config element in WEB_INF/web.xml. This is used for specifying the JSP configuration information on a
+ * JSP page
  *
  * @author Kin-man Chung
  * @author Remy Maucherat
@@ -44,8 +44,8 @@ public class JspConfig {
     private final ServletContext ctxt;
     private volatile boolean initialized = false;
 
-    private static final String defaultIsXml = null;    // unspecified
-    private String defaultIsELIgnored = null;           // unspecified
+    private static final String defaultIsXml = null; // unspecified
+    private String defaultIsELIgnored = null; // unspecified
     private String defaultErrorOnELNotFound = "false";
     private static final String defaultIsScriptingInvalid = null;
     private String defaultDeferedSyntaxAllowedAsLiteral = null;
@@ -84,8 +84,7 @@ public class JspConfig {
         }
 
         jspProperties = new ArrayList<>();
-        Collection<JspPropertyGroupDescriptor> jspPropertyGroups =
-                jspConfig.getJspPropertyGroups();
+        Collection<JspPropertyGroupDescriptor> jspPropertyGroups = jspConfig.getJspPropertyGroups();
 
         for (JspPropertyGroupDescriptor jspPropertyGroup : jspPropertyGroups) {
 
@@ -95,20 +94,14 @@ public class JspConfig {
                 continue;
             }
 
-            JspProperty property = new JspProperty(jspPropertyGroup.getIsXml(),
-                    jspPropertyGroup.getElIgnored(),
-                    jspPropertyGroup.getErrorOnELNotFound(),
-                    jspPropertyGroup.getScriptingInvalid(),
-                    jspPropertyGroup.getPageEncoding(),
-                    jspPropertyGroup.getIncludePreludes(),
-                    jspPropertyGroup.getIncludeCodas(),
-                    jspPropertyGroup.getDeferredSyntaxAllowedAsLiteral(),
-                    jspPropertyGroup.getTrimDirectiveWhitespaces(),
-                    jspPropertyGroup.getDefaultContentType(),
-                    jspPropertyGroup.getBuffer(),
-                    jspPropertyGroup.getErrorOnUndeclaredNamespace());
-
-            // Add one JspPropertyGroup for each URL Pattern.  This makes
+            JspProperty property = new JspProperty(jspPropertyGroup.getIsXml(), jspPropertyGroup.getElIgnored(),
+                    jspPropertyGroup.getErrorOnELNotFound(), jspPropertyGroup.getScriptingInvalid(),
+                    jspPropertyGroup.getPageEncoding(), jspPropertyGroup.getIncludePreludes(),
+                    jspPropertyGroup.getIncludeCodas(), jspPropertyGroup.getDeferredSyntaxAllowedAsLiteral(),
+                    jspPropertyGroup.getTrimDirectiveWhitespaces(), jspPropertyGroup.getDefaultContentType(),
+                    jspPropertyGroup.getBuffer(), jspPropertyGroup.getErrorOnUndeclaredNamespace());
+
+            // Add one JspPropertyGroup for each URL Pattern. This makes
             // the matching logic easier.
             for (String urlPattern : urlPatterns) {
                 String path = null;
@@ -121,8 +114,8 @@ public class JspConfig {
                     int i = urlPattern.lastIndexOf('/');
                     String file;
                     if (i >= 0) {
-                        path = urlPattern.substring(0,i+1);
-                        file = urlPattern.substring(i+1);
+                        path = urlPattern.substring(0, i + 1);
+                        file = urlPattern.substring(i + 1);
                     } else {
                         file = urlPattern;
                     }
@@ -131,27 +124,23 @@ public class JspConfig {
                     if (file.equals("*")) {
                         extension = "*";
                     } else if (file.startsWith("*.")) {
-                        extension = file.substring(file.indexOf('.')+1);
+                        extension = file.substring(file.indexOf('.') + 1);
                     }
 
                     // The url patterns are reconstructed as the following:
-                    // path != null, extension == null:  / or /foo/bar.ext
-                    // path == null, extension != null:  *.ext
-                    // path != null, extension == "*":   /foo/*
+                    // path != null, extension == null: / or /foo/bar.ext
+                    // path == null, extension != null: *.ext
+                    // path != null, extension == "*": /foo/*
                     boolean isStar = "*".equals(extension);
-                    if ((path == null && (extension == null || isStar))
-                            || (path != null && !isStar)) {
+                    if ((path == null && (extension == null || isStar)) || (path != null && !isStar)) {
                         if (log.isWarnEnabled()) {
-                            log.warn(Localizer.getMessage(
-                                    "jsp.warning.bad.urlpattern.propertygroup",
-                                    urlPattern));
+                            log.warn(Localizer.getMessage("jsp.warning.bad.urlpattern.propertygroup", urlPattern));
                         }
                         continue;
                     }
                 }
 
-                JspPropertyGroup propertyGroup =
-                    new JspPropertyGroup(path, extension, property);
+                JspPropertyGroup propertyGroup = new JspPropertyGroup(path, extension, property);
 
                 jspProperties.add(propertyGroup);
             }
@@ -164,15 +153,9 @@ public class JspConfig {
             synchronized (this) {
                 if (!initialized) {
                     processWebDotXml();
-                    defaultJspProperty = new JspProperty(defaultIsXml,
-                            defaultIsELIgnored,
-                            defaultErrorOnELNotFound,
-                            defaultIsScriptingInvalid,
-                            null, null, null,
-                            defaultDeferedSyntaxAllowedAsLiteral,
-                            defaultTrimDirectiveWhitespaces,
-                            defaultDefaultContentType,
-                            defaultBuffer,
+                    defaultJspProperty = new JspProperty(defaultIsXml, defaultIsELIgnored, defaultErrorOnELNotFound,
+                            defaultIsScriptingInvalid, null, null, null, defaultDeferedSyntaxAllowedAsLiteral,
+                            defaultTrimDirectiveWhitespaces, defaultDefaultContentType, defaultBuffer,
                             defaultErrorOnUndeclaredNamespace);
                     initialized = true;
                 }
@@ -181,12 +164,10 @@ public class JspConfig {
     }
 
     /**
-     * Select the property group that has more restrictive url-pattern.
-     * In case of tie, select the first.
+     * Select the property group that has more restrictive url-pattern. In case of tie, select the first.
      */
     @SuppressWarnings("null") // NPE not possible
-    private JspPropertyGroup selectProperty(JspPropertyGroup prev,
-            JspPropertyGroup curr) {
+    private JspPropertyGroup selectProperty(JspPropertyGroup prev, JspPropertyGroup curr) {
         if (prev == null) {
             return curr;
         }
@@ -219,7 +200,9 @@ public class JspConfig {
 
     /**
      * Find a property that best matches the supplied resource.
+     *
      * @param uri the resource supplied.
+     *
      * @return a JspProperty indicating the best match, or some default.
      */
     public JspProperty findJspProperty(String uri) {
@@ -227,20 +210,19 @@ public class JspConfig {
         init();
 
         // JSP Configuration settings do not apply to tag files
-        if (jspProperties == null || uri.endsWith(".tag")
-                || uri.endsWith(".tagx")) {
+        if (jspProperties == null || uri.endsWith(".tag") || uri.endsWith(".tagx")) {
             return defaultJspProperty;
         }
 
         String uriPath = null;
         int index = uri.lastIndexOf('/');
-        if (index >=0 ) {
-            uriPath = uri.substring(0, index+1);
+        if (index >= 0) {
+            uriPath = uri.substring(0, index + 1);
         }
         String uriExtension = null;
         index = uri.lastIndexOf('.');
-        if (index >=0) {
-            uriExtension = uri.substring(index+1);
+        if (index >= 0) {
+            uriExtension = uri.substring(index + 1);
         }
 
         Collection<String> includePreludes = new ArrayList<>();
@@ -272,13 +254,11 @@ public class JspConfig {
                 }
             } else {
                 // Matching patterns *.ext or /p/*
-                if (path != null && uriPath != null &&
-                        ! uriPath.startsWith(path)) {
+                if (path != null && uriPath != null && !uriPath.startsWith(path)) {
                     // not matched
                     continue;
                 }
-                if (!extension.equals("*") &&
-                        !extension.equals(uriExtension)) {
+                if (!extension.equals("*") && !extension.equals(uriExtension)) {
                     // not matched
                     continue;
                 }
@@ -304,30 +284,25 @@ public class JspConfig {
                 errorOnELNotFoundMatch = selectProperty(errorOnELNotFoundMatch, jpg);
             }
             if (jp.isScriptingInvalid() != null) {
-                scriptingInvalidMatch =
-                    selectProperty(scriptingInvalidMatch, jpg);
+                scriptingInvalidMatch = selectProperty(scriptingInvalidMatch, jpg);
             }
             if (jp.getPageEncoding() != null) {
                 pageEncodingMatch = selectProperty(pageEncodingMatch, jpg);
             }
             if (jp.isDeferedSyntaxAllowedAsLiteral() != null) {
-                deferedSyntaxAllowedAsLiteralMatch =
-                    selectProperty(deferedSyntaxAllowedAsLiteralMatch, jpg);
+                deferedSyntaxAllowedAsLiteralMatch = selectProperty(deferedSyntaxAllowedAsLiteralMatch, jpg);
             }
             if (jp.isTrimDirectiveWhitespaces() != null) {
-                trimDirectiveWhitespacesMatch =
-                    selectProperty(trimDirectiveWhitespacesMatch, jpg);
+                trimDirectiveWhitespacesMatch = selectProperty(trimDirectiveWhitespacesMatch, jpg);
             }
             if (jp.getDefaultContentType() != null) {
-                defaultContentTypeMatch =
-                    selectProperty(defaultContentTypeMatch, jpg);
+                defaultContentTypeMatch = selectProperty(defaultContentTypeMatch, jpg);
             }
             if (jp.getBuffer() != null) {
                 bufferMatch = selectProperty(bufferMatch, jpg);
             }
             if (jp.isErrorOnUndeclaredNamespace() != null) {
-                errorOnUndeclaredNamespaceMatch =
-                    selectProperty(errorOnUndeclaredNamespaceMatch, jpg);
+                errorOnUndeclaredNamespaceMatch = selectProperty(errorOnUndeclaredNamespaceMatch, jpg);
             }
         }
 
@@ -353,42 +328,40 @@ public class JspConfig {
             isELIgnored = elIgnoredMatch.getJspProperty().isELIgnored();
         }
         if (scriptingInvalidMatch != null) {
-            isScriptingInvalid =
-                scriptingInvalidMatch.getJspProperty().isScriptingInvalid();
+            isScriptingInvalid = scriptingInvalidMatch.getJspProperty().isScriptingInvalid();
         }
         if (pageEncodingMatch != null) {
             pageEncoding = pageEncodingMatch.getJspProperty().getPageEncoding();
         }
         if (deferedSyntaxAllowedAsLiteralMatch != null) {
             isDeferedSyntaxAllowedAsLiteral =
-                deferedSyntaxAllowedAsLiteralMatch.getJspProperty().isDeferedSyntaxAllowedAsLiteral();
+                    deferedSyntaxAllowedAsLiteralMatch.getJspProperty().isDeferedSyntaxAllowedAsLiteral();
         }
         if (trimDirectiveWhitespacesMatch != null) {
-            isTrimDirectiveWhitespaces =
-                trimDirectiveWhitespacesMatch.getJspProperty().isTrimDirectiveWhitespaces();
+            isTrimDirectiveWhitespaces = trimDirectiveWhitespacesMatch.getJspProperty().isTrimDirectiveWhitespaces();
         }
         if (defaultContentTypeMatch != null) {
-            defaultContentType =
-                defaultContentTypeMatch.getJspProperty().getDefaultContentType();
+            defaultContentType = defaultContentTypeMatch.getJspProperty().getDefaultContentType();
         }
         if (bufferMatch != null) {
             buffer = bufferMatch.getJspProperty().getBuffer();
         }
         if (errorOnUndeclaredNamespaceMatch != null) {
             errorOnUndeclaredNamespace =
-                errorOnUndeclaredNamespaceMatch.getJspProperty().isErrorOnUndeclaredNamespace();
+                    errorOnUndeclaredNamespaceMatch.getJspProperty().isErrorOnUndeclaredNamespace();
         }
 
-        return new JspProperty(isXml, isELIgnored, errorOnELNotFound, isScriptingInvalid,
-                pageEncoding, includePreludes, includeCodas,
-                isDeferedSyntaxAllowedAsLiteral, isTrimDirectiveWhitespaces,
-                defaultContentType, buffer, errorOnUndeclaredNamespace);
+        return new JspProperty(isXml, isELIgnored, errorOnELNotFound, isScriptingInvalid, pageEncoding, includePreludes,
+                includeCodas, isDeferedSyntaxAllowedAsLiteral, isTrimDirectiveWhitespaces, defaultContentType, buffer,
+                errorOnUndeclaredNamespace);
     }
 
     /**
-     * To find out if a uri matches a url pattern in jsp config.  If so,
-     * then the uri is a JSP page.  This is used primarily for jspc.
+     * To find out if a uri matches a url pattern in jsp config. If so, then the uri is a JSP page. This is used
+     * primarily for jspc.
+     *
      * @param uri The path to check
+     *
      * @return <code>true</code> if the path denotes a JSP page
      */
     public boolean isJspPage(String uri) {
@@ -400,13 +373,13 @@ public class JspConfig {
 
         String uriPath = null;
         int index = uri.lastIndexOf('/');
-        if (index >=0 ) {
-            uriPath = uri.substring(0, index+1);
+        if (index >= 0) {
+            uriPath = uri.substring(0, index + 1);
         }
         String uriExtension = null;
         index = uri.lastIndexOf('.');
-        if (index >=0) {
-            uriExtension = uri.substring(index+1);
+        if (index >= 0) {
+            uriExtension = uri.substring(index + 1);
         }
 
         for (JspPropertyGroup jpg : jspProperties) {
@@ -435,8 +408,7 @@ public class JspConfig {
         private final String extension;
         private final JspProperty jspProperty;
 
-        JspPropertyGroup(String path, String extension,
-                JspProperty jspProperty) {
+        JspPropertyGroup(String path, String extension, JspProperty jspProperty) {
             this.path = path;
             this.extension = extension;
             this.jspProperty = jspProperty;
@@ -470,14 +442,10 @@ public class JspConfig {
         private final String buffer;
         private final String errorOnUndeclaredNamespace;
 
-        public JspProperty(String isXml, String elIgnored, String errorOnELNotFound,
-                String scriptingInvalid, String pageEncoding,
-                Collection<String> includePrelude, Collection<String> includeCoda,
-                String deferedSyntaxAllowedAsLiteral,
-                String trimDirectiveWhitespaces,
-                String defaultContentType,
-                String buffer,
-                String errorOnUndeclaredNamespace) {
+        public JspProperty(String isXml, String elIgnored, String errorOnELNotFound, String scriptingInvalid,
+                String pageEncoding, Collection<String> includePrelude, Collection<String> includeCoda,
+                String deferedSyntaxAllowedAsLiteral, String trimDirectiveWhitespaces, String defaultContentType,
+                String buffer, String errorOnUndeclaredNamespace) {
 
             this.isXml = isXml;
             this.elIgnored = elIgnored;
diff --git a/java/org/apache/jasper/compiler/JspDocumentParser.java b/java/org/apache/jasper/compiler/JspDocumentParser.java
index fe0c27bf0b..7a933ff9bd 100644
--- a/java/org/apache/jasper/compiler/JspDocumentParser.java
+++ b/java/org/apache/jasper/compiler/JspDocumentParser.java
@@ -46,19 +46,15 @@ import org.xml.sax.ext.EntityResolver2;
 import org.xml.sax.helpers.AttributesImpl;
 
 /**
- * Class implementing a parser for a JSP document, that is, a JSP page in XML
- * syntax.
+ * Class implementing a parser for a JSP document, that is, a JSP page in XML syntax.
  *
  * @author Jan Luehe
  * @author Kin-man Chung
  */
 
-class JspDocumentParser
-    extends DefaultHandler2
-    implements TagConstants {
+class JspDocumentParser extends DefaultHandler2 implements TagConstants {
 
-    private static final String LEXICAL_HANDLER_PROPERTY =
-        "http://xml.org/sax/properties/lexical-handler";
+    private static final String LEXICAL_HANDLER_PROPERTY = "http://xml.org/sax/properties/lexical-handler";
     private static final String JSP_URI = "http://java.sun.com/JSP/Page";
 
     private final ParserController parserController;
@@ -71,24 +67,23 @@ class JspDocumentParser
     private Node current;
 
     /*
-     * Outermost (in the nesting hierarchy) node whose body is declared to be
-     * scriptless. If a node's body is declared to be scriptless, all its
-     * nested nodes must be scriptless, too.
+     * Outermost (in the nesting hierarchy) node whose body is declared to be scriptless. If a node's body is declared
+     * to be scriptless, all its nested nodes must be scriptless, too.
      */
     private Node scriptlessBodyNode;
 
     private Locator locator;
 
-    //Mark representing the start of the current element.  Note
-    //that locator.getLineNumber() and locator.getColumnNumber()
-    //return the line and column numbers for the character
-    //immediately _following_ the current element.  The underlying
-    //XMl parser eats white space that is not part of character
-    //data, so for Nodes that are not created from character data,
-    //this is the best we can do.  But when we parse character data,
-    //we get an accurate starting location by starting with startMark
-    //as set by the previous element, and updating it as we advance
-    //through the characters.
+    // Mark representing the start of the current element. Note
+    // that locator.getLineNumber() and locator.getColumnNumber()
+    // return the line and column numbers for the character
+    // immediately _following_ the current element. The underlying
+    // XMl parser eats white space that is not part of character
+    // data, so for Nodes that are not created from character data,
+    // this is the best we can do. But when we parse character data,
+    // we get an accurate starting location by starting with startMark
+    // as set by the previous element, and updating it as we advance
+    // through the characters.
     private Mark startMark;
 
     // Flag indicating whether we are inside DTD declarations
@@ -111,11 +106,7 @@ class JspDocumentParser
     /*
      * Constructor
      */
-    JspDocumentParser(
-        ParserController pc,
-        String path,
-        boolean isTagFile,
-        boolean directivesOnly) {
+    JspDocumentParser(ParserController pc, String path, boolean isTagFile, boolean directivesOnly) {
         this.parserController = pc;
         this.ctxt = pc.getJspCompilationContext();
         this.pageInfo = pc.getCompiler().getPageInfo();
@@ -125,8 +116,7 @@ class JspDocumentParser
         this.directivesOnly = directivesOnly;
         this.isTop = true;
 
-        String blockExternalString = ctxt.getServletContext().getInitParameter(
-                Constants.XML_BLOCK_EXTERNAL_INIT_PARAM);
+        String blockExternalString = ctxt.getServletContext().getInitParameter(Constants.XML_BLOCK_EXTERNAL_INIT_PARAM);
         boolean blockExternal;
         if (blockExternalString == null) {
             blockExternal = true;
@@ -134,10 +124,8 @@ class JspDocumentParser
             blockExternal = Boolean.parseBoolean(blockExternalString);
         }
 
-        this.entityResolver = new LocalResolver(
-                DigesterFactory.SERVLET_API_PUBLIC_IDS,
-                DigesterFactory.SERVLET_API_SYSTEM_IDS,
-                blockExternal);
+        this.entityResolver = new LocalResolver(DigesterFactory.SERVLET_API_PUBLIC_IDS,
+                DigesterFactory.SERVLET_API_SYSTEM_IDS, blockExternal);
     }
 
     /*
@@ -145,21 +133,11 @@ class JspDocumentParser
      *
      * @throws JasperException
      */
-    public static Node.Nodes parse(
-        ParserController pc,
-        String path,
-        Jar jar,
-        Node parent,
-        boolean isTagFile,
-        boolean directivesOnly,
-        String pageEnc,
-        String jspConfigPageEnc,
-        boolean isEncodingSpecifiedInProlog,
-        boolean isBomPresent)
-        throws JasperException {
-
-        JspDocumentParser jspDocParser =
-            new JspDocumentParser(pc, path, isTagFile, directivesOnly);
+    public static Node.Nodes parse(ParserController pc, String path, Jar jar, Node parent, boolean isTagFile,
+            boolean directivesOnly, String pageEnc, String jspConfigPageEnc, boolean isEncodingSpecifiedInProlog,
+            boolean isBomPresent) throws JasperException {
+
+        JspDocumentParser jspDocParser = new JspDocumentParser(pc, path, isTagFile, directivesOnly);
         Node.Nodes pageNodes = null;
 
         try {
@@ -169,14 +147,11 @@ class JspDocumentParser
                     pc.getJspCompilationContext().getOptions().getTempVariableNamePrefix());
             dummyRoot.setPageEncoding(pageEnc);
             dummyRoot.setJspConfigPageEncoding(jspConfigPageEnc);
-            dummyRoot.setIsEncodingSpecifiedInProlog(
-                isEncodingSpecifiedInProlog);
+            dummyRoot.setIsEncodingSpecifiedInProlog(isEncodingSpecifiedInProlog);
             dummyRoot.setIsBomPresent(isBomPresent);
             jspDocParser.current = dummyRoot;
             if (parent == null) {
-                jspDocParser.addInclude(
-                    dummyRoot,
-                    jspDocParser.pageInfo.getIncludePrelude());
+                jspDocParser.addInclude(dummyRoot, jspDocParser.pageInfo.getIncludePrelude());
             } else {
                 jspDocParser.isTop = false;
             }
@@ -207,9 +182,7 @@ class JspDocumentParser
             }
 
             if (parent == null) {
-                jspDocParser.addInclude(
-                    dummyRoot,
-                    jspDocParser.pageInfo.getIncludeCoda());
+                jspDocParser.addInclude(dummyRoot, jspDocParser.pageInfo.getIncludeCoda());
             }
 
             // Create Node.Nodes from dummy root
@@ -218,10 +191,8 @@ class JspDocumentParser
         } catch (IOException ioe) {
             jspDocParser.err.jspError(ioe, "jsp.error.data.file.read", path);
         } catch (SAXParseException e) {
-            jspDocParser.err.jspError
-                (new Mark(jspDocParser.ctxt, path, e.getLineNumber(),
-                          e.getColumnNumber()),
-                e, e.getMessage());
+            jspDocParser.err.jspError(new Mark(jspDocParser.ctxt, path, e.getLineNumber(), e.getColumnNumber()), e,
+                    e.getMessage());
         } catch (Exception e) {
             jspDocParser.err.jspError(e, "jsp.error.data.file.processing", path);
         }
@@ -232,8 +203,7 @@ class JspDocumentParser
     /*
      * Processes the given list of included files.
      *
-     * This is used to implement the include-prelude and include-coda
-     * subelements of the jsp-config element in web.xml
+     * This is used to implement the include-prelude and include-coda subelements of the jsp-config element in web.xml
      */
     private void addInclude(Node parent, Collection<String> files) throws SAXException {
         if (files != null) {
@@ -242,9 +212,8 @@ class JspDocumentParser
                 attrs.addAttribute("", "file", "file", "CDATA", file);
 
                 // Create a dummy Include directive node
-                Node includeDir =
-                        new Node.IncludeDirective(attrs, null, // XXX
-    parent);
+                Node includeDir = new Node.IncludeDirective(attrs, null, // XXX
+                        parent);
                 processIncludeDirective(file, includeDir);
             }
         }
@@ -252,23 +221,21 @@ class JspDocumentParser
 
 
     @Override
-    public InputSource getExternalSubset(String name, String baseURI)
-            throws SAXException, IOException {
+    public InputSource getExternalSubset(String name, String baseURI) throws SAXException, IOException {
         return entityResolver.getExternalSubset(name, baseURI);
     }
 
     @Override
-    public InputSource resolveEntity(String publicId, String systemId)
-            throws SAXException, IOException {
+    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
         return entityResolver.resolveEntity(publicId, systemId);
     }
 
     @Override
-    public InputSource resolveEntity(String name, String publicId,
-            String baseURI, String systemId) throws SAXException, IOException {
+    public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId)
+            throws SAXException, IOException {
         // TODO URLs returned by the Jar abstraction may be of the form jar:jar:
-        //      which is not a URL that can be resolved by the JRE. This should
-        //      use the JarFactory to construct and return a valid InputSource.
+        // which is not a URL that can be resolved by the JRE. This should
+        // use the JarFactory to construct and return a valid InputSource.
         return entityResolver.resolveEntity(name, publicId, baseURI, systemId);
     }
 
@@ -277,21 +244,14 @@ class JspDocumentParser
      *
      * This method assigns the given tag attributes to one of 3 buckets:
      *
-     * - "xmlns" attributes that represent (standard or custom) tag libraries.
-     * - "xmlns" attributes that do not represent tag libraries.
-     * - all remaining attributes.
+     * - "xmlns" attributes that represent (standard or custom) tag libraries. - "xmlns" attributes that do not
+     * represent tag libraries. - all remaining attributes.
      *
-     * For each "xmlns" attribute that represents a custom tag library, the
-     * corresponding TagLibraryInfo object is added to the set of custom
-     * tag libraries.
+     * For each "xmlns" attribute that represents a custom tag library, the corresponding TagLibraryInfo object is added
+     * to the set of custom tag libraries.
      */
     @Override
-    public void startElement(
-        String uri,
-        String localName,
-        String qName,
-        Attributes attrs)
-        throws SAXException {
+    public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException {
 
         AttributesImpl taglibAttrs = null;
         AttributesImpl nonTaglibAttrs = null;
@@ -301,24 +261,19 @@ class JspDocumentParser
 
         checkPrefixes(uri, qName, attrs);
 
-        if (directivesOnly &&
-            !(JSP_URI.equals(uri) && localName.startsWith(DIRECTIVE_ACTION))) {
+        if (directivesOnly && !(JSP_URI.equals(uri) && localName.startsWith(DIRECTIVE_ACTION))) {
             return;
         }
 
         // jsp:text must not have any subelements
         if (current instanceof Node.JspText) {
-            throw new SAXParseException(
-                Localizer.getMessage("jsp.error.text.has_subelement"),
-                locator);
+            throw new SAXParseException(Localizer.getMessage("jsp.error.text.has_subelement"), locator);
         }
 
-        startMark = new Mark(ctxt, path, locator.getLineNumber(),
-                             locator.getColumnNumber());
+        startMark = new Mark(ctxt, path, locator.getLineNumber(), locator.getColumnNumber());
 
         /*
-         * Notice that due to a bug in the underlying SAX parser, the
-         * attributes must be enumerated in descending order.
+         * Notice that due to a bug in the underlying SAX parser, the attributes must be enumerated in descending order.
          */
         boolean isTaglib = false;
         for (int i = attrs.getLength() - 1; i >= 0; i--) {
@@ -328,12 +283,8 @@ class JspDocumentParser
                 if (nonTaglibAttrs == null) {
                     nonTaglibAttrs = new AttributesImpl();
                 }
-                nonTaglibAttrs.addAttribute(
-                    attrs.getURI(i),
-                    attrs.getLocalName(i),
-                    attrs.getQName(i),
-                    attrs.getType(i),
-                    attrs.getValue(i));
+                nonTaglibAttrs.addAttribute(attrs.getURI(i), attrs.getLocalName(i), attrs.getQName(i), attrs.getType(i),
+                        attrs.getValue(i));
             } else {
                 if (attrQName.startsWith("xmlns:jsp")) {
                     isTaglib = true;
@@ -347,53 +298,31 @@ class JspDocumentParser
                     if (taglibAttrs == null) {
                         taglibAttrs = new AttributesImpl();
                     }
-                    taglibAttrs.addAttribute(
-                        attrs.getURI(i),
-                        attrs.getLocalName(i),
-                        attrs.getQName(i),
-                        attrs.getType(i),
-                        attrs.getValue(i));
+                    taglibAttrs.addAttribute(attrs.getURI(i), attrs.getLocalName(i), attrs.getQName(i),
+                            attrs.getType(i), attrs.getValue(i));
                 } else {
                     if (nonTaglibXmlnsAttrs == null) {
                         nonTaglibXmlnsAttrs = new AttributesImpl();
                     }
-                    nonTaglibXmlnsAttrs.addAttribute(
-                        attrs.getURI(i),
-                        attrs.getLocalName(i),
-                        attrs.getQName(i),
-                        attrs.getType(i),
-                        attrs.getValue(i));
+                    nonTaglibXmlnsAttrs.addAttribute(attrs.getURI(i), attrs.getLocalName(i), attrs.getQName(i),
+                            attrs.getType(i), attrs.getValue(i));
                 }
             }
         }
 
         Node node = null;
 
-        if (tagDependentPending && JSP_URI.equals(uri) &&
-                     localName.equals(BODY_ACTION)) {
+        if (tagDependentPending && JSP_URI.equals(uri) && localName.equals(BODY_ACTION)) {
             tagDependentPending = false;
             tagDependentNesting++;
             current =
-                parseStandardAction(
-                    qName,
-                    localName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    startMark);
+                    parseStandardAction(qName, localName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, startMark);
             return;
         }
 
-        if (tagDependentPending && JSP_URI.equals(uri) &&
-                     localName.equals(ATTRIBUTE_ACTION)) {
+        if (tagDependentPending && JSP_URI.equals(uri) && localName.equals(ATTRIBUTE_ACTION)) {
             current =
-                parseStandardAction(
-                    qName,
-                    localName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    startMark);
+                    parseStandardAction(qName, localName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, startMark);
             return;
         }
 
@@ -403,54 +332,23 @@ class JspDocumentParser
         }
 
         if (tagDependentNesting > 0) {
-            node =
-                new Node.UninterpretedTag(
-                    qName,
-                    localName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    startMark,
-                    current);
+            node = new Node.UninterpretedTag(qName, localName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs,
+                    startMark, current);
         } else if (JSP_URI.equals(uri)) {
-            node =
-                parseStandardAction(
-                    qName,
-                    localName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    startMark);
+            node = parseStandardAction(qName, localName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, startMark);
         } else {
-            node =
-                parseCustomAction(
-                    qName,
-                    localName,
-                    uri,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    startMark,
+            node = parseCustomAction(qName, localName, uri, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, startMark,
                     current);
             if (node == null) {
-                node =
-                    new Node.UninterpretedTag(
-                        qName,
-                        localName,
-                        nonTaglibAttrs,
-                        nonTaglibXmlnsAttrs,
-                        taglibAttrs,
-                        startMark,
-                        current);
+                node = new Node.UninterpretedTag(qName, localName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs,
+                        startMark, current);
             } else {
                 // custom action
                 String bodyType = getBodyType((Node.CustomTag) node);
 
-                if (scriptlessBodyNode == null
-                        && bodyType.equalsIgnoreCase(TagInfo.BODY_CONTENT_SCRIPTLESS)) {
+                if (scriptlessBodyNode == null && bodyType.equalsIgnoreCase(TagInfo.BODY_CONTENT_SCRIPTLESS)) {
                     scriptlessBodyNode = node;
-                }
-                else if (TagInfo.BODY_CONTENT_TAG_DEPENDENT.equalsIgnoreCase(bodyType)) {
+                } else if (TagInfo.BODY_CONTENT_TAG_DEPENDENT.equalsIgnoreCase(bodyType)) {
                     tagDependentPending = true;
                 }
             }
@@ -462,15 +360,15 @@ class JspDocumentParser
     /*
      * Receives notification of character data inside an element.
      *
-     * The SAX does not call this method with all of the template text, but may
-     * invoke this method with chunks of it.  This is a problem when we try
-     * to determine if the text contains only whitespaces, or when we are
-     * looking for an EL expression string.  Therefore it is necessary to
-     * buffer and concatenate the chunks and process the concatenated text
-     * later (at beginTag and endTag)
+     * The SAX does not call this method with all of the template text, but may invoke this method with chunks of it.
+     * This is a problem when we try to determine if the text contains only whitespaces, or when we are looking for an
+     * EL expression string. Therefore it is necessary to buffer and concatenate the chunks and process the concatenated
+     * text later (at beginTag and endTag)
      *
      * @param buf The characters
+     *
      * @param offset The start position in the character array
+     *
      * @param len The number of characters to use from the character array
      *
      * @throws SAXException
@@ -491,17 +389,13 @@ class JspDocumentParser
         }
 
         /*
-         * JSP.6.1.1: All textual nodes that have only white space are to be
-         * dropped from the document, except for nodes in a jsp:text element,
-         * and any leading and trailing white-space-only textual nodes in a
-         * jsp:attribute whose 'trim' attribute is set to FALSE, which are to
-         * be kept verbatim.
-         * <p>
-         * JSP.6.2.3 defines white space characters.
+         * JSP.6.1.1: All textual nodes that have only white space are to be dropped from the document, except for nodes
+         * in a jsp:text element, and any leading and trailing white-space-only textual nodes in a jsp:attribute whose
+         * 'trim' attribute is set to FALSE, which are to be kept verbatim. <p> JSP.6.2.3 defines white space
+         * characters.
          */
         boolean isAllSpace = true;
-        if (!(current instanceof Node.JspText)
-            && !(current instanceof Node.NamedAttribute)) {
+        if (!(current instanceof Node.JspText) && !(current instanceof Node.NamedAttribute)) {
             for (int i = 0; i < charBuffer.length(); i++) {
                 char ch = charBuffer.charAt(i);
                 if (!(ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t')) {
@@ -516,22 +410,17 @@ class JspDocumentParser
             tagDependentNesting++;
         }
 
-        if (tagDependentNesting > 0 || pageInfo.isELIgnored() ||
-                current instanceof Node.ScriptingElement) {
+        if (tagDependentNesting > 0 || pageInfo.isELIgnored() || current instanceof Node.ScriptingElement) {
             if (charBuffer.length() > 0) {
                 @SuppressWarnings("unused")
-                Node unused = new Node.TemplateText(
-                        charBuffer.toString(), startMark, current);
+                Node unused = new Node.TemplateText(charBuffer.toString(), startMark, current);
             }
-            startMark = new Mark(ctxt, path, locator.getLineNumber(),
-                                 locator.getColumnNumber());
+            startMark = new Mark(ctxt, path, locator.getLineNumber(), locator.getColumnNumber());
             charBuffer = null;
             return;
         }
 
-        if ((current instanceof Node.JspText)
-            || (current instanceof Node.NamedAttribute)
-            || !isAllSpace) {
+        if ((current instanceof Node.JspText) || (current instanceof Node.NamedAttribute) || !isAllSpace) {
 
             int line = startMark.getLineNumber();
             int column = startMark.getColumnNumber();
@@ -551,11 +440,10 @@ class JspDocumentParser
                     elType = lastCh;
                     if (ttext.size() > 0) {
                         @SuppressWarnings("unused")
-                        Node unused = new Node.TemplateText(
-                                ttext.toString(), startMark, current);
+                        Node unused = new Node.TemplateText(ttext.toString(), startMark, current);
                         ttext.reset();
-                        //We subtract two from the column number to
-                        //account for the '[$,#]{' that we've already parsed
+                        // We subtract two from the column number to
+                        // account for the '[$,#]{' that we've already parsed
                         startMark = new Mark(ctxt, path, line, column - 2);
                     }
                     // following "${" || "#{" to first unquoted "}"
@@ -566,10 +454,7 @@ class JspDocumentParser
                     for (;; i++) {
                         if (i >= charBuffer.length()) {
                             throw new SAXParseException(
-                                Localizer.getMessage(
-                                    "jsp.error.unterminated",
-                                    (char) elType + "{"),
-                                locator);
+                                    Localizer.getMessage("jsp.error.unterminated", (char) elType + "{"), locator);
 
                         }
                         ch = charBuffer.charAt(i);
@@ -586,9 +471,7 @@ class JspDocumentParser
                         }
                         if (ch == '}') {
                             @SuppressWarnings("unused")
-                            Node unused = new Node.ELExpression(
-                                    (char) elType, ttext.toString(),
-                                    startMark, current);
+                            Node unused = new Node.ELExpression((char) elType, ttext.toString(), startMark, current);
                             ttext.reset();
                             startMark = new Mark(ctxt, path, line, column);
                             break;
@@ -607,7 +490,7 @@ class JspDocumentParser
                         ttext.write('\\');
                     }
                     ttext.write(ch);
-                    ch = 0;  // Not start of EL anymore
+                    ch = 0; // Not start of EL anymore
                 } else {
                     if (lastCh == '$' || lastCh == '#' || lastCh == '\\') {
                         ttext.write(lastCh);
@@ -623,29 +506,25 @@ class JspDocumentParser
             }
             if (ttext.size() > 0) {
                 @SuppressWarnings("unused")
-                Node unused = new Node.TemplateText(
-                        ttext.toString(), startMark, current);
+                Node unused = new Node.TemplateText(ttext.toString(), startMark, current);
             }
         }
-        startMark = new Mark(ctxt, path, locator.getLineNumber(),
-                             locator.getColumnNumber());
+        startMark = new Mark(ctxt, path, locator.getLineNumber(), locator.getColumnNumber());
 
         charBuffer = null;
     }
 
     @Override
-    public void endElement(String uri, String localName, String qName)
-        throws SAXException {
+    public void endElement(String uri, String localName, String qName) throws SAXException {
 
         processChars();
 
-        if (directivesOnly &&
-            !(JSP_URI.equals(uri) && localName.startsWith(DIRECTIVE_ACTION))) {
+        if (directivesOnly && !(JSP_URI.equals(uri) && localName.startsWith(DIRECTIVE_ACTION))) {
             return;
         }
 
         if (current instanceof Node.NamedAttribute) {
-            boolean isTrim = ((Node.NamedAttribute)current).isTrim();
+            boolean isTrim = ((Node.NamedAttribute) current).isTrim();
             Node.Nodes subElems = current.getBody();
             for (int i = 0; subElems != null && i < subElems.size(); i++) {
                 Node subElem = subElems.getNode(i);
@@ -663,28 +542,27 @@ class JspDocumentParser
                 // is set to FALSE, which must be kept verbatim.
                 if (i == 0) {
                     if (isTrim) {
-                        ((Node.TemplateText)subElem).ltrim();
+                        ((Node.TemplateText) subElem).ltrim();
                     }
                 } else if (i == subElems.size() - 1) {
                     if (isTrim) {
-                        ((Node.TemplateText)subElem).rtrim();
+                        ((Node.TemplateText) subElem).rtrim();
                     }
                 } else {
-                    if (((Node.TemplateText)subElem).isAllSpace()) {
+                    if (((Node.TemplateText) subElem).isAllSpace()) {
                         subElems.remove(subElem);
                     }
                 }
             }
         } else if (current instanceof Node.ScriptingElement) {
-            checkScriptingBody((Node.ScriptingElement)current);
+            checkScriptingBody((Node.ScriptingElement) current);
         }
 
-        if ( isTagDependent(current)) {
+        if (isTagDependent(current)) {
             tagDependentNesting--;
         }
 
-        if (scriptlessBodyNode != null
-                && current.equals(scriptlessBodyNode)) {
+        if (scriptlessBodyNode != null && current.equals(scriptlessBodyNode)) {
             scriptlessBodyNode = null;
         }
 
@@ -697,9 +575,9 @@ class JspDocumentParser
                     for (int i = 0; i < children.size(); i++) {
                         Node child = children.getNode(i);
                         if (!(child instanceof Node.NamedAttribute)) {
-                            throw new SAXParseException(Localizer.getMessage(
-                                    "jasper.error.emptybodycontent.nonempty",
-                                    current.qName), locator);
+                            throw new SAXParseException(
+                                    Localizer.getMessage("jasper.error.emptybodycontent.nonempty", current.qName),
+                                    locator);
                         }
                     }
                 }
@@ -721,12 +599,11 @@ class JspDocumentParser
     @Override
     public void comment(char[] buf, int offset, int len) throws SAXException {
 
-        processChars();  // Flush char buffer and remove white spaces
+        processChars(); // Flush char buffer and remove white spaces
 
         // ignore comments in the DTD
         if (!inDTD) {
-            startMark = new Mark(ctxt, path, locator.getLineNumber(),
-                    locator.getColumnNumber());
+            startMark = new Mark(ctxt, path, locator.getLineNumber(), locator.getColumnNumber());
             @SuppressWarnings("unused")
             Node unused = new Node.Comment(new String(buf, offset, len), startMark, current);
         }
@@ -738,9 +615,8 @@ class JspDocumentParser
     @Override
     public void startCDATA() throws SAXException {
 
-        processChars();  // Flush char buffer and remove white spaces
-        startMark = new Mark(ctxt, path, locator.getLineNumber(),
-                             locator.getColumnNumber());
+        processChars(); // Flush char buffer and remove white spaces
+        startMark = new Mark(ctxt, path, locator.getLineNumber(), locator.getColumnNumber());
     }
 
     /*
@@ -748,7 +624,7 @@ class JspDocumentParser
      */
     @Override
     public void endCDATA() throws SAXException {
-        processChars();  // Flush char buffer and remove white spaces
+        processChars(); // Flush char buffer and remove white spaces
     }
 
     /*
@@ -771,11 +647,9 @@ class JspDocumentParser
      * See org.xml.sax.ext.LexicalHandler.
      */
     @Override
-    public void startDTD(String name, String publicId, String systemId)
-        throws SAXException {
+    public void startDTD(String name, String publicId, String systemId) throws SAXException {
         if (!isValidating) {
-            fatalError(new EnableDTDValidationException(
-                    "jsp.error.enable_dtd_validation", null));
+            fatalError(new EnableDTDValidationException("jsp.error.enable_dtd_validation", null));
         }
 
         inDTD = true;
@@ -800,8 +674,7 @@ class JspDocumentParser
     }
 
     @Override
-    public void startPrefixMapping(String prefix, String uri)
-        throws SAXException {
+    public void startPrefixMapping(String prefix, String uri) throws SAXException {
         TagLibraryInfo taglibInfo;
 
         if (directivesOnly && !(JSP_URI.equals(uri))) {
@@ -811,10 +684,7 @@ class JspDocumentParser
         try {
             taglibInfo = getTaglibInfo(prefix, uri);
         } catch (JasperException je) {
-            throw new SAXParseException(
-                Localizer.getMessage("jsp.error.could.not.add.taglibraries"),
-                locator,
-                je);
+            throw new SAXParseException(Localizer.getMessage("jsp.error.could.not.add.taglibraries"), locator, je);
         }
 
         if (taglibInfo != null) {
@@ -840,326 +710,120 @@ class JspDocumentParser
         pageInfo.popPrefixMapping(prefix);
     }
 
-    //*********************************************************************
+    // *********************************************************************
     // Private utility methods
 
-    private Node parseStandardAction(
-        String qName,
-        String localName,
-        Attributes nonTaglibAttrs,
-        Attributes nonTaglibXmlnsAttrs,
-        Attributes taglibAttrs,
-        Mark start)
-        throws SAXException {
+    private Node parseStandardAction(String qName, String localName, Attributes nonTaglibAttrs,
+            Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, Mark start) throws SAXException {
 
         Node node = null;
 
         if (localName.equals(ROOT_ACTION)) {
             if (!(current instanceof Node.Root)) {
-                throw new SAXParseException(
-                    Localizer.getMessage("jsp.error.nested_jsproot"),
-                    locator);
+                throw new SAXParseException(Localizer.getMessage("jsp.error.nested_jsproot"), locator);
             }
-            node =
-                new Node.JspRoot(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.JspRoot(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
             if (isTop) {
                 pageInfo.setHasJspRoot(true);
             }
         } else if (localName.equals(PAGE_DIRECTIVE_ACTION)) {
             if (isTagFile) {
-                throw new SAXParseException(
-                    Localizer.getMessage(
-                        "jsp.error.action.istagfile",
-                        localName),
-                    locator);
+                throw new SAXParseException(Localizer.getMessage("jsp.error.action.istagfile", localName), locator);
             }
-            node =
-                new Node.PageDirective(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.PageDirective(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
             String imports = nonTaglibAttrs.getValue("import");
             // There can only be one 'import' attribute per page directive
             if (imports != null) {
-                ((Node.PageDirective)node).addImport(imports);
+                ((Node.PageDirective) node).addImport(imports);
             }
         } else if (localName.equals(INCLUDE_DIRECTIVE_ACTION)) {
-            node =
-                new Node.IncludeDirective(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.IncludeDirective(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
             processIncludeDirective(nonTaglibAttrs.getValue("file"), node);
         } else if (localName.equals(DECLARATION_ACTION)) {
             if (scriptlessBodyNode != null) {
                 // We're nested inside a node whose body is
                 // declared to be scriptless
-                throw new SAXParseException(
-                    Localizer.getMessage(
-                        "jsp.error.no.scriptlets",
-                        localName),
-                    locator);
+                throw new SAXParseException(Localizer.getMessage("jsp.error.no.scriptlets", localName), locator);
             }
-            node =
-                new Node.Declaration(
-                    qName,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.Declaration(qName, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(SCRIPTLET_ACTION)) {
             if (scriptlessBodyNode != null) {
                 // We're nested inside a node whose body is
                 // declared to be scriptless
-                throw new SAXParseException(
-                    Localizer.getMessage(
-                        "jsp.error.no.scriptlets",
-                        localName),
-                    locator);
+                throw new SAXParseException(Localizer.getMessage("jsp.error.no.scriptlets", localName), locator);
             }
-            node =
-                new Node.Scriptlet(
-                    qName,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.Scriptlet(qName, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(EXPRESSION_ACTION)) {
             if (scriptlessBodyNode != null) {
                 // We're nested inside a node whose body is
                 // declared to be scriptless
-                throw new SAXParseException(
-                    Localizer.getMessage(
-                        "jsp.error.no.scriptlets",
-                        localName),
-                    locator);
+                throw new SAXParseException(Localizer.getMessage("jsp.error.no.scriptlets", localName), locator);
             }
-            node =
-                new Node.Expression(
-                    qName,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.Expression(qName, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(USE_BEAN_ACTION)) {
-            node =
-                new Node.UseBean(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.UseBean(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(SET_PROPERTY_ACTION)) {
-            node =
-                new Node.SetProperty(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.SetProperty(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(GET_PROPERTY_ACTION)) {
-            node =
-                new Node.GetProperty(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.GetProperty(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(INCLUDE_ACTION)) {
-            node =
-                new Node.IncludeAction(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.IncludeAction(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(FORWARD_ACTION)) {
-            node =
-                new Node.ForwardAction(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.ForwardAction(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(PARAM_ACTION)) {
-            node =
-                new Node.ParamAction(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.ParamAction(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(TEXT_ACTION)) {
-            node =
-                new Node.JspText(
-                    qName,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.JspText(qName, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(BODY_ACTION)) {
-            node =
-                new Node.JspBody(
-                    qName,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.JspBody(qName, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(ATTRIBUTE_ACTION)) {
-            node =
-                new Node.NamedAttribute(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.NamedAttribute(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(OUTPUT_ACTION)) {
-            node =
-                new Node.JspOutput(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.JspOutput(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(TAG_DIRECTIVE_ACTION)) {
             if (!isTagFile) {
-                throw new SAXParseException(
-                    Localizer.getMessage(
-                        "jsp.error.action.isnottagfile",
-                        localName),
-                    locator);
+                throw new SAXParseException(Localizer.getMessage("jsp.error.action.isnottagfile", localName), locator);
             }
-            node =
-                new Node.TagDirective(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.TagDirective(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
             String imports = nonTaglibAttrs.getValue("import");
             // There can only be one 'import' attribute per tag directive
             if (imports != null) {
-                ((Node.TagDirective)node).addImport(imports);
+                ((Node.TagDirective) node).addImport(imports);
             }
         } else if (localName.equals(ATTRIBUTE_DIRECTIVE_ACTION)) {
             if (!isTagFile) {
-                throw new SAXParseException(
-                    Localizer.getMessage(
-                        "jsp.error.action.isnottagfile",
-                        localName),
-                    locator);
+                throw new SAXParseException(Localizer.getMessage("jsp.error.action.isnottagfile", localName), locator);
             }
-            node =
-                new Node.AttributeDirective(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.AttributeDirective(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(VARIABLE_DIRECTIVE_ACTION)) {
             if (!isTagFile) {
-                throw new SAXParseException(
-                    Localizer.getMessage(
-                        "jsp.error.action.isnottagfile",
-                        localName),
-                    locator);
+                throw new SAXParseException(Localizer.getMessage("jsp.error.action.isnottagfile", localName), locator);
             }
-            node =
-                new Node.VariableDirective(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.VariableDirective(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(INVOKE_ACTION)) {
             if (!isTagFile) {
-                throw new SAXParseException(
-                    Localizer.getMessage(
-                        "jsp.error.action.isnottagfile",
-                        localName),
-                    locator);
+                throw new SAXParseException(Localizer.getMessage("jsp.error.action.isnottagfile", localName), locator);
             }
-            node =
-                new Node.InvokeAction(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.InvokeAction(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(DOBODY_ACTION)) {
             if (!isTagFile) {
-                throw new SAXParseException(
-                    Localizer.getMessage(
-                        "jsp.error.action.isnottagfile",
-                        localName),
-                    locator);
+                throw new SAXParseException(Localizer.getMessage("jsp.error.action.isnottagfile", localName), locator);
             }
-            node =
-                new Node.DoBodyAction(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.DoBodyAction(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else if (localName.equals(ELEMENT_ACTION)) {
-            node =
-                new Node.JspElement(
-                    qName,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    current);
+            node = new Node.JspElement(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current);
         } else {
-            throw new SAXParseException(
-                Localizer.getMessage(
-                    "jsp.error.xml.badStandardAction",
-                    localName),
-                locator);
+            throw new SAXParseException(Localizer.getMessage("jsp.error.xml.badStandardAction", localName), locator);
         }
 
         return node;
     }
 
     /*
-     * Checks if the XML element with the given tag name is a custom action,
-     * and returns the corresponding Node object.
+     * Checks if the XML element with the given tag name is a custom action, and returns the corresponding Node object.
      */
-    private Node parseCustomAction(
-        String qName,
-        String localName,
-        String uri,
-        Attributes nonTaglibAttrs,
-        Attributes nonTaglibXmlnsAttrs,
-        Attributes taglibAttrs,
-        Mark start,
-        Node parent)
-        throws SAXException {
+    private Node parseCustomAction(String qName, String localName, String uri, Attributes nonTaglibAttrs,
+            Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, Mark start, Node parent) throws SAXException {
 
         // Check if this is a user-defined (custom) tag
         TagLibraryInfo tagLibInfo = pageInfo.getTaglib(uri);
@@ -1170,22 +834,16 @@ class JspDocumentParser
         TagInfo tagInfo = tagLibInfo.getTag(localName);
         TagFileInfo tagFileInfo = tagLibInfo.getTagFile(localName);
         if (tagInfo == null && tagFileInfo == null) {
-            throw new SAXParseException(
-                Localizer.getMessage("jsp.error.xml.bad_tag", localName, uri),
-                locator);
+            throw new SAXParseException(Localizer.getMessage("jsp.error.xml.bad_tag", localName, uri), locator);
         }
         Class<?> tagHandlerClass = null;
         if (tagInfo != null) {
             String handlerClassName = tagInfo.getTagClassName();
             try {
-                tagHandlerClass =
-                    ctxt.getClassLoader().loadClass(handlerClassName);
+                tagHandlerClass = ctxt.getClassLoader().loadClass(handlerClassName);
             } catch (Exception e) {
                 throw new SAXParseException(
-                    Localizer.getMessage("jsp.error.loadclass.taghandler",
-                                         handlerClassName,
-                                         qName),
-                    locator, e);
+                        Localizer.getMessage("jsp.error.loadclass.taghandler", handlerClassName, qName), locator, e);
             }
         }
 
@@ -1193,62 +851,33 @@ class JspDocumentParser
 
         Node.CustomTag ret = null;
         if (tagInfo != null) {
-            ret =
-                new Node.CustomTag(
-                    qName,
-                    prefix,
-                    localName,
-                    uri,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    parent,
-                    tagInfo,
-                    tagHandlerClass);
+            ret = new Node.CustomTag(qName, prefix, localName, uri, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs,
+                    start, parent, tagInfo, tagHandlerClass);
         } else {
-            ret =
-                new Node.CustomTag(
-                    qName,
-                    prefix,
-                    localName,
-                    uri,
-                    nonTaglibAttrs,
-                    nonTaglibXmlnsAttrs,
-                    taglibAttrs,
-                    start,
-                    parent,
-                    tagFileInfo);
+            ret = new Node.CustomTag(qName, prefix, localName, uri, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs,
+                    start, parent, tagFileInfo);
         }
 
         return ret;
     }
 
     /*
-     * Creates the tag library associated with the given uri namespace, and
-     * returns it.
+     * Creates the tag library associated with the given uri namespace, and returns it.
      *
      * @param prefix The prefix of the xmlns attribute
+     *
      * @param uri The uri namespace (value of the xmlns attribute)
      *
      * @return The tag library associated with the given uri namespace
      */
-    private TagLibraryInfo getTaglibInfo(String prefix, String uri)
-        throws JasperException {
+    private TagLibraryInfo getTaglibInfo(String prefix, String uri) throws JasperException {
 
         TagLibraryInfo result = null;
 
         if (uri.startsWith(URN_JSPTAGDIR)) {
             // uri (of the form "urn:jsptagdir:path") references tag file dir
             String tagdir = uri.substring(URN_JSPTAGDIR.length());
-            result =
-                new ImplicitTagLibraryInfo(
-                    ctxt,
-                    parserController,
-                    pageInfo,
-                    prefix,
-                    tagdir,
-                    err);
+            result = new ImplicitTagLibraryInfo(ctxt, parserController, pageInfo, prefix, tagdir, err);
         } else {
             // uri references TLD file
             boolean isPlainUri = false;
@@ -1266,19 +895,11 @@ class JspDocumentParser
                 }
                 if (result == null) {
                     /*
-                     * If the uri value is a plain uri, a translation error must
-                     * not be generated if the uri is not found in the taglib map.
-                     * Instead, any actions in the namespace defined by the uri
-                     * value must be treated as uninterpreted.
+                     * If the uri value is a plain uri, a translation error must not be generated if the uri is not
+                     * found in the taglib map. Instead, any actions in the namespace defined by the uri value must be
+                     * treated as uninterpreted.
                      */
-                    result =
-                        new TagLibraryInfoImpl(
-                            ctxt,
-                            parserController,
-                            pageInfo,
-                            prefix,
-                            uri,
-                            tldResourcePath,
+                    result = new TagLibraryInfoImpl(ctxt, parserController, pageInfo, prefix, uri, tldResourcePath,
                             err);
                     if (ctxt.getOptions().isCaching()) {
                         ctxt.getOptions().getCache().put(uri, result);
@@ -1291,15 +912,12 @@ class JspDocumentParser
     }
 
     /*
-     * Ensures that the given body only contains nodes that are instances of
-     * TemplateText.
+     * Ensures that the given body only contains nodes that are instances of TemplateText.
      *
-     * This check is performed only for the body of a scripting (that is:
-     * declaration, scriptlet, or expression) element, after the end tag of a
-     * scripting element has been reached.
+     * This check is performed only for the body of a scripting (that is: declaration, scriptlet, or expression)
+     * element, after the end tag of a scripting element has been reached.
      */
-    private void checkScriptingBody(Node.ScriptingElement scriptingElem)
-        throws SAXException {
+    private void checkScriptingBody(Node.ScriptingElement scriptingElem) throws SAXException {
         Node.Nodes body = scriptingElem.getBody();
         if (body != null) {
             int size = body.size();
@@ -1313,10 +931,7 @@ class JspDocumentParser
                     if (scriptingElem instanceof Node.Expression) {
                         elemType = EXPRESSION_ACTION;
                     }
-                    String msg =
-                        Localizer.getMessage(
-                            "jsp.error.parse.xml.scripting.invalid.body",
-                            elemType);
+                    String msg = Localizer.getMessage("jsp.error.parse.xml.scripting.invalid.body", elemType);
                     throw new SAXParseException(msg, locator);
                 }
             }
@@ -1326,12 +941,11 @@ class JspDocumentParser
     /*
      * Parses the given file included via an include directive.
      *
-     * @param fname The path to the included resource, as specified by the
-     * 'file' attribute of the include directive
+     * @param fname The path to the included resource, as specified by the 'file' attribute of the include directive
+     *
      * @param parent The Node representing the include directive
      */
-    private void processIncludeDirective(String fname, Node parent)
-        throws SAXException {
+    private void processIncludeDirective(String fname, Node parent) throws SAXException {
 
         if (fname == null) {
             return;
@@ -1340,22 +954,20 @@ class JspDocumentParser
         try {
             parserController.parse(fname, parent, null);
         } catch (FileNotFoundException fnfe) {
-            throw new SAXParseException(
-                Localizer.getMessage("jsp.error.file.not.found", fname),
-                locator,
-                fnfe);
+            throw new SAXParseException(Localizer.getMessage("jsp.error.file.not.found", fname), locator, fnfe);
         } catch (Exception e) {
             throw new SAXParseException(e.getMessage(), locator, e);
         }
     }
 
     /*
-     * Checks an element's given URI, qname, and attributes to see if any
-     * of them hijack the 'jsp' prefix, that is, bind it to a namespace other
-     * than http://java.sun.com/JSP/Page.
+     * Checks an element's given URI, qname, and attributes to see if any of them hijack the 'jsp' prefix, that is, bind
+     * it to a namespace other than http://java.sun.com/JSP/Page.
      *
      * @param uri The element's URI
+     *
      * @param qName The element's qname
+     *
      * @param attrs The element's attributes
      */
     private void checkPrefixes(String uri, String qName, Attributes attrs) {
@@ -1369,11 +981,11 @@ class JspDocumentParser
     }
 
     /*
-     * Checks the given URI and qname to see if they hijack the 'jsp' prefix,
-     * which would be the case if qName contained the 'jsp' prefix and
-     * uri was different from http://java.sun.com/JSP/Page.
+     * Checks the given URI and qname to see if they hijack the 'jsp' prefix, which would be the case if qName contained
+     * the 'jsp' prefix and uri was different from http://java.sun.com/JSP/Page.
      *
      * @param uri The URI to check
+     *
      * @param qName The qname to check
      */
     private void checkPrefix(String uri, String qName) {
@@ -1398,16 +1010,13 @@ class JspDocumentParser
     /*
      * Gets SAXParser.
      *
-     * @param validating Indicates whether the requested SAXParser should
-     * be validating
+     * @param validating Indicates whether the requested SAXParser should be validating
+     *
      * @param jspDocParser The JSP document parser
      *
      * @return The SAXParser
      */
-    private static SAXParser getSAXParser(
-        boolean validating,
-        JspDocumentParser jspDocParser)
-        throws Exception {
+    private static SAXParser getSAXParser(boolean validating, JspDocumentParser jspDocParser) throws Exception {
 
         Thread currentThread = Thread.currentThread();
         ClassLoader original = currentThread.getContextClassLoader();
@@ -1418,20 +1027,14 @@ class JspDocumentParser
 
             factory.setNamespaceAware(true);
             // Preserve xmlns attributes
-            factory.setFeature(
-                "http://xml.org/sax/features/namespace-prefixes",
-                true);
+            factory.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
 
             factory.setValidating(validating);
             if (validating) {
                 // Enable DTD validation
-                factory.setFeature(
-                        "http://xml.org/sax/features/validation",
-                        true);
+                factory.setFeature("http://xml.org/sax/features/validation", true);
                 // Enable schema validation
-                factory.setFeature(
-                        "http://apache.org/xml/features/validation/schema",
-                        true);
+                factory.setFeature("http://apache.org/xml/features/validation/schema", true);
             }
 
             // Configure the parser
@@ -1447,11 +1050,9 @@ class JspDocumentParser
     }
 
     /*
-     * Exception indicating that a DOCTYPE declaration is present, but
-     * validation is turned off.
+     * Exception indicating that a DOCTYPE declaration is present, but validation is turned off.
      */
-    private static class EnableDTDValidationException
-            extends SAXParseException {
+    private static class EnableDTDValidationException extends SAXParseException {
 
         private static final long serialVersionUID = 1L;
 
@@ -1479,8 +1080,7 @@ class JspDocumentParser
 
         if (n instanceof Node.CustomTag) {
             String bodyType = getBodyType((Node.CustomTag) n);
-            return
-                TagInfo.BODY_CONTENT_TAG_DEPENDENT.equalsIgnoreCase(bodyType);
+            return TagInfo.BODY_CONTENT_TAG_DEPENDENT.equalsIgnoreCase(bodyType);
         }
         return false;
     }


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


(tomcat) 01/02: Prepare for automated formatting

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 2c5d0786422c0ada63b16eedcab069deae966e81
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Nov 29 17:27:28 2024 +0000

    Prepare for automated formatting
---
 java/org/apache/jasper/compiler/Generator.java     | 38 +++++++---------------
 .../apache/jasper/compiler/JspDocumentParser.java  |  1 +
 2 files changed, 13 insertions(+), 26 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java
index 53babe5bfe..12784a46b7 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -57,24 +57,10 @@ import org.xml.sax.Attributes;
 /**
  * Generate Java source from Nodes
  *
- * @author Anil K. Vijendran
- * @author Danno Ferrin
- * @author Mandar Raje
- * @author Rajiv Mordani
- * @author Pierre Delisle
- *
- * Tomcat 4.1.x and Tomcat 5:
- * @author Kin-man Chung
- * @author Jan Luehe
- * @author Shawn Bayern
- * @author Mark Roth
- * @author Denis Benoit
- *
- * Tomcat 6.x
- * @author Jacob Hookom
- * @author Remy Maucherat
+ * @author Anil K. Vijendran, Danno Ferrin, Mandar Raje, Rajiv Mordani, Pierre Delisle
+ * @author Tomcat 4.1.x and Tomcat 5: Kin-man Chung, Jan Luehe, Shawn Bayern, Mark Roth, Denis Benoit
+ * @author Tomcat 6.x: Jacob Hookom, Remy Maucherat
  */
-
 class Generator {
 
     private static final Class<?>[] OBJECT_CLASS = { Object.class };
@@ -410,9 +396,7 @@ class Generator {
     }
 
     /*
-     * Generates getters for
-     * - instance manager
-     * - expression factory
+     * Generates getters for instance manager & expression factory.
      *
      * For JSPs these methods use lazy init. This is not an option for tag files
      * (at least it would be more complicated to generate) because the
@@ -484,7 +468,7 @@ class Generator {
      * Generates the _jspInit() method for instantiating the tag handler pools.
      * For tag file, _jspInit has to be invoked manually, and the ServletConfig
      * object explicitly passed.
-     *
+     * <p>
      * In JSP 2.1, we also instantiate an ExpressionFactory
      */
     private void generateInit() {
@@ -654,7 +638,7 @@ class Generator {
      * Declare tag handler pools (tags of the same type and with the same
      * attribute set share the same tag handler pool) (shared by servlet and tag
      * handler preamble generation)
-     *
+     * <p>
      * In JSP 2.1, we also scope an instance of ExpressionFactory
      */
     private void genPreambleClassVariableDeclarations() {
@@ -857,9 +841,9 @@ class Generator {
     private void generateXmlProlog(Node.Nodes page) {
 
         /*
-         * An XML declaration is generated under the following conditions: -
+         * An XML declaration is generated under the following conditions: a)
          * 'omit-xml-declaration' attribute of <jsp:output> action is set to
-         * "no" or "false" - JSP document without a <jsp:root>
+         * "no" or "false"; b) JSP document without a <jsp:root>.
          */
         String omitXmlDecl = pageInfo.getOmitXmlDecl();
         if ((omitXmlDecl != null && !JspUtil.booleanValue(omitXmlDecl)) ||
@@ -875,7 +859,6 @@ class Generator {
          * doctype-public appears: <!DOCTYPE name PUBLIC "doctypePublic"
          * "doctypeSystem"> else <!DOCTYPE name SYSTEM "doctypeSystem" >
          */
-
         String doctypeName = pageInfo.getDoctypeName();
         if (doctypeName != null) {
             String doctypePublic = pageInfo.getDoctypePublic();
@@ -903,8 +886,11 @@ class Generator {
 
         /*
          * Map containing introspection information on tag handlers:
+         *
          * <key>: tag prefix <value>: Map containing introspection on tag
-         * handlers: <key>: tag short name <value>: introspection info of tag
+         * handlers
+         *
+         * <key>: tag short name <value>: introspection info of tag
          * handler for <prefix:shortName> tag
          */
         private final Map<String,Map<String,TagHandlerInfo>> handlerInfos;
diff --git a/java/org/apache/jasper/compiler/JspDocumentParser.java b/java/org/apache/jasper/compiler/JspDocumentParser.java
index 71f18d991d..fe0c27bf0b 100644
--- a/java/org/apache/jasper/compiler/JspDocumentParser.java
+++ b/java/org/apache/jasper/compiler/JspDocumentParser.java
@@ -496,6 +496,7 @@ class JspDocumentParser
          * and any leading and trailing white-space-only textual nodes in a
          * jsp:attribute whose 'trim' attribute is set to FALSE, which are to
          * be kept verbatim.
+         * <p>
          * JSP.6.2.3 defines white space characters.
          */
         boolean isAllSpace = true;


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