Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=48132
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 5 Nov 2009 01:16:53 +0000 (01:16 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 5 Nov 2009 01:16:53 +0000 (01:16 +0000)
Patch provided by sebb

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@832953 13f79535-47bb-0310-9956-ffa450edef68

52 files changed:
java/org/apache/jasper/compiler/AntCompiler.java
java/org/apache/jasper/compiler/Collector.java
java/org/apache/jasper/compiler/Dumper.java
java/org/apache/jasper/compiler/ELFunctionMapper.java
java/org/apache/jasper/compiler/ELNode.java
java/org/apache/jasper/compiler/ELParser.java
java/org/apache/jasper/compiler/ErrorDispatcher.java
java/org/apache/jasper/compiler/Generator.java
java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
java/org/apache/jasper/compiler/JDTCompiler.java
java/org/apache/jasper/compiler/JasperTagInfo.java
java/org/apache/jasper/compiler/JspDocumentParser.java
java/org/apache/jasper/compiler/Mark.java
java/org/apache/jasper/compiler/Node.java
java/org/apache/jasper/compiler/PageDataImpl.java
java/org/apache/jasper/compiler/ScriptingVariabler.java
java/org/apache/jasper/compiler/SmapGenerator.java
java/org/apache/jasper/compiler/SmapStratum.java
java/org/apache/jasper/compiler/SmapUtil.java
java/org/apache/jasper/compiler/TagFileProcessor.java
java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
java/org/apache/jasper/compiler/TagPluginManager.java
java/org/apache/jasper/compiler/TextOptimizer.java
java/org/apache/jasper/compiler/Validator.java
java/org/apache/jasper/el/ELContextImpl.java
java/org/apache/jasper/el/ELContextWrapper.java
java/org/apache/jasper/el/ELResolverImpl.java
java/org/apache/jasper/el/ExpressionEvaluatorImpl.java
java/org/apache/jasper/el/ExpressionImpl.java
java/org/apache/jasper/el/FunctionMapperImpl.java
java/org/apache/jasper/el/JspMethodExpression.java
java/org/apache/jasper/el/JspValueExpression.java
java/org/apache/jasper/runtime/BodyContentImpl.java
java/org/apache/jasper/runtime/HttpJspBase.java
java/org/apache/jasper/runtime/JspContextWrapper.java
java/org/apache/jasper/runtime/JspFactoryImpl.java
java/org/apache/jasper/runtime/JspFragmentHelper.java
java/org/apache/jasper/runtime/JspWriterImpl.java
java/org/apache/jasper/runtime/PageContextImpl.java
java/org/apache/jasper/runtime/PerThreadTagHandlerPool.java
java/org/apache/jasper/runtime/ProtectedFunctionMapper.java
java/org/apache/jasper/runtime/ServletResponseWrapperInclude.java
java/org/apache/jasper/servlet/JasperLoader.java
java/org/apache/jasper/servlet/JspServlet.java
java/org/apache/jasper/tagplugins/jstl/Util.java
java/org/apache/jasper/xmlparser/ASCIIReader.java
java/org/apache/jasper/xmlparser/TreeNode.java
java/org/apache/jasper/xmlparser/UCSReader.java
java/org/apache/jasper/xmlparser/UTF8Reader.java
java/org/apache/jasper/xmlparser/XMLEncodingDetector.java
java/org/apache/jasper/xmlparser/XMLString.java
java/org/apache/jasper/xmlparser/XMLStringBuffer.java

index 9146a19..b45946e 100644 (file)
@@ -87,11 +87,13 @@ public class AntCompiler extends Compiler {
         
         protected StringBuilder reportBuf = new StringBuilder();
         
+        @Override
         protected void printMessage(final String message,
                 final PrintStream stream,
                 final int priority) {
         }
         
+        @Override
         protected void log(String message) {
             reportBuf.append(message);
             reportBuf.append(System.getProperty("line.separator"));
@@ -110,6 +112,7 @@ public class AntCompiler extends Compiler {
     /** 
      * Compile the servlet from .java file to .class file
      */
+    @Override
     protected void generateClass(String[] smap)
         throws FileNotFoundException, JasperException, Exception {
         
@@ -384,107 +387,133 @@ public class AntCompiler extends Compiler {
         // ---------------------------------------------------- PrintStream Methods
 
 
+        @Override
         public void flush() {
             findStream().flush();
         }
 
+        @Override
         public void close() {
             findStream().close();
         }
 
+        @Override
         public boolean checkError() {
             return findStream().checkError();
         }
 
+        @Override
         protected void setError() {
             //findStream().setError();
         }
 
+        @Override
         public void write(int b) {
             findStream().write(b);
         }
 
+        @Override
         public void write(byte[] b)
             throws IOException {
             findStream().write(b);
         }
 
+        @Override
         public void write(byte[] buf, int off, int len) {
             findStream().write(buf, off, len);
         }
 
+        @Override
         public void print(boolean b) {
             findStream().print(b);
         }
 
+        @Override
         public void print(char c) {
             findStream().print(c);
         }
 
+        @Override
         public void print(int i) {
             findStream().print(i);
         }
 
+        @Override
         public void print(long l) {
             findStream().print(l);
         }
 
+        @Override
         public void print(float f) {
             findStream().print(f);
         }
 
+        @Override
         public void print(double d) {
             findStream().print(d);
         }
 
+        @Override
         public void print(char[] s) {
             findStream().print(s);
         }
 
+        @Override
         public void print(String s) {
             findStream().print(s);
         }
 
+        @Override
         public void print(Object obj) {
             findStream().print(obj);
         }
 
+        @Override
         public void println() {
             findStream().println();
         }
 
+        @Override
         public void println(boolean x) {
             findStream().println(x);
         }
 
+        @Override
         public void println(char x) {
             findStream().println(x);
         }
 
+        @Override
         public void println(int x) {
             findStream().println(x);
         }
 
+        @Override
         public void println(long x) {
             findStream().println(x);
         }
 
+        @Override
         public void println(float x) {
             findStream().println(x);
         }
 
+        @Override
         public void println(double x) {
             findStream().println(x);
         }
 
+        @Override
         public void println(char[] x) {
             findStream().println(x);
         }
 
+        @Override
         public void println(String x) {
             findStream().println(x);
         }
 
+        @Override
         public void println(Object x) {
             findStream().println(x);
         }
index 50b2b9d..9fa4e4a 100644 (file)
@@ -42,6 +42,7 @@ class Collector {
         private boolean setPropertySeen = false;
         private boolean hasScriptingVars = false;
 
+        @Override
         public void visit(Node.ParamAction n) throws JasperException {
             if (n.getValue().isExpression()) {
                 scriptingElementSeen = true;
@@ -49,6 +50,7 @@ class Collector {
             paramActionSeen = true;
         }
 
+        @Override
         public void visit(Node.IncludeAction n) throws JasperException {
             if (n.getPage().isExpression()) {
                 scriptingElementSeen = true;
@@ -57,6 +59,7 @@ class Collector {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.ForwardAction n) throws JasperException {
             if (n.getPage().isExpression()) {
                 scriptingElementSeen = true;
@@ -64,6 +67,7 @@ class Collector {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.SetProperty n) throws JasperException {
             if (n.getValue() != null && n.getValue().isExpression()) {
                 scriptingElementSeen = true;
@@ -71,6 +75,7 @@ class Collector {
             setPropertySeen = true;
         }
 
+        @Override
         public void visit(Node.UseBean n) throws JasperException {
             if (n.getBeanName() != null && n.getBeanName().isExpression()) {
                 scriptingElementSeen = true;
@@ -79,6 +84,7 @@ class Collector {
                 visitBody(n);
         }
 
+        @Override
         public void visit(Node.PlugIn n) throws JasperException {
             if (n.getHeight() != null && n.getHeight().isExpression()) {
                 scriptingElementSeen = true;
@@ -89,6 +95,7 @@ class Collector {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.CustomTag n) throws JasperException {
             // Check to see what kinds of element we see as child elements
             checkSeen( n.getChildInfo(), n );
@@ -152,6 +159,7 @@ class Collector {
             hasScriptingVars = hasScriptingVars || hasScriptingVarsSave;
         }
 
+        @Override
         public void visit(Node.JspElement n) throws JasperException {
             if (n.getNameAttribute().isExpression())
                 scriptingElementSeen = true;
@@ -166,22 +174,27 @@ class Collector {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.JspBody n) throws JasperException {
             checkSeen( n.getChildInfo(), n );
         }
 
+        @Override
         public void visit(Node.NamedAttribute n) throws JasperException {
             checkSeen( n.getChildInfo(), n );
         }
 
+        @Override
         public void visit(Node.Declaration n) throws JasperException {
             scriptingElementSeen = true;
         }
 
+        @Override
         public void visit(Node.Expression n) throws JasperException {
             scriptingElementSeen = true;
         }
 
+        @Override
         public void visit(Node.Scriptlet n) throws JasperException {
             scriptingElementSeen = true;
         }
index 04f453f..8c45491 100644 (file)
@@ -65,111 +65,132 @@ class Dumper {
            }
         }
 
+        @Override
         public void visit(Node.PageDirective n) throws JasperException {
            printAttributes("<%@ page", n.getAttributes(), "%>");
         }
 
+        @Override
         public void visit(Node.TaglibDirective n) throws JasperException {
            printAttributes("<%@ taglib", n.getAttributes(), "%>");
         }
 
+        @Override
         public void visit(Node.IncludeDirective n) throws JasperException {
            printAttributes("<%@ include", n.getAttributes(), "%>");
            dumpBody(n);
         }
 
+        @Override
         public void visit(Node.Comment n) throws JasperException {
            printString("<%--", n.getText(), "--%>");
         }
 
+        @Override
         public void visit(Node.Declaration n) throws JasperException {
            printString("<%!", n.getText(), "%>");
         }
 
+        @Override
         public void visit(Node.Expression n) throws JasperException {
            printString("<%=", n.getText(), "%>");
         }
 
+        @Override
         public void visit(Node.Scriptlet n) throws JasperException {
            printString("<%", n.getText(), "%>");
         }
 
+        @Override
         public void visit(Node.IncludeAction n) throws JasperException {
            printAttributes("<jsp:include", n.getAttributes(), ">");
            dumpBody(n);
             printString("</jsp:include>");
         }
 
+        @Override
         public void visit(Node.ForwardAction n) throws JasperException {
            printAttributes("<jsp:forward", n.getAttributes(), ">");
            dumpBody(n);
            printString("</jsp:forward>");
         }
 
+        @Override
         public void visit(Node.GetProperty n) throws JasperException {
            printAttributes("<jsp:getProperty", n.getAttributes(), "/>");
         }
 
+        @Override
         public void visit(Node.SetProperty n) throws JasperException {
            printAttributes("<jsp:setProperty", n.getAttributes(), ">");
             dumpBody(n);
             printString("</jsp:setProperty>");
         }
 
+        @Override
         public void visit(Node.UseBean n) throws JasperException {
            printAttributes("<jsp:useBean", n.getAttributes(), ">");
            dumpBody(n);
            printString("</jsp:useBean>");
         }
        
+        @Override
         public void visit(Node.PlugIn n) throws JasperException {
            printAttributes("<jsp:plugin", n.getAttributes(), ">");
            dumpBody(n);
            printString("</jsp:plugin>");
        }
         
+        @Override
         public void visit(Node.ParamsAction n) throws JasperException {
            printAttributes("<jsp:params", n.getAttributes(), ">");
            dumpBody(n);
            printString("</jsp:params>");
         }
         
+        @Override
         public void visit(Node.ParamAction n) throws JasperException {
            printAttributes("<jsp:param", n.getAttributes(), ">");
            dumpBody(n);
            printString("</jsp:param>");
         }
         
+        @Override
         public void visit(Node.NamedAttribute n) throws JasperException {
            printAttributes("<jsp:attribute", n.getAttributes(), ">");
            dumpBody(n);
            printString("</jsp:attribute>");
         }
 
+        @Override
         public void visit(Node.JspBody n) throws JasperException {
            printAttributes("<jsp:body", n.getAttributes(), ">");
            dumpBody(n);
            printString("</jsp:body>");
         }
         
+        @Override
         public void visit(Node.ELExpression n) throws JasperException {
            printString( "${" + new String( n.getText() ) + "}" );
         }
 
+        @Override
         public void visit(Node.CustomTag n) throws JasperException {
            printAttributes("<" + n.getQName(), n.getAttributes(), ">");
            dumpBody(n);
            printString("</" + n.getQName() + ">");
         }
 
-       public void visit(Node.UninterpretedTag n) throws JasperException {
+       @Override
+    public void visit(Node.UninterpretedTag n) throws JasperException {
            String tag = n.getQName();
            printAttributes("<"+tag, n.getAttributes(), ">");
            dumpBody(n);
            printString("</" + tag + ">");
         }
 
-       public void visit(Node.TemplateText n) throws JasperException {
+       @Override
+    public void visit(Node.TemplateText n) throws JasperException {
            printString(new String(n.getText()));
        }
 
index dd65bc5..252c2e4 100644 (file)
@@ -70,37 +70,44 @@ public class ELFunctionMapper {
          */
         private HashMap<String, String> gMap = new HashMap<String, String>();
 
+        @Override
         public void visit(Node.ParamAction n) throws JasperException {
             doMap(n.getValue());
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.IncludeAction n) throws JasperException {
             doMap(n.getPage());
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.ForwardAction n) throws JasperException {
             doMap(n.getPage());
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.SetProperty n) throws JasperException {
             doMap(n.getValue());
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.UseBean n) throws JasperException {
             doMap(n.getBeanName());
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.PlugIn n) throws JasperException {
             doMap(n.getHeight());
             doMap(n.getWidth());
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.JspElement n) throws JasperException {
 
             Node.JspAttribute[] attrs = n.getJspAttributes();
@@ -111,6 +118,7 @@ public class ELFunctionMapper {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.UninterpretedTag n) throws JasperException {
 
             Node.JspAttribute[] attrs = n.getJspAttributes();
@@ -120,6 +128,7 @@ public class ELFunctionMapper {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.CustomTag n) throws JasperException {
             Node.JspAttribute[] attrs = n.getJspAttributes();
             for (int i = 0; attrs != null && i < attrs.length; i++) {
@@ -128,6 +137,7 @@ public class ELFunctionMapper {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.ELExpression n) throws JasperException {
             doMap(n.getEL());
         }
@@ -150,6 +160,7 @@ public class ELFunctionMapper {
                 ArrayList<ELNode.Function> funcs =
                     new ArrayList<ELNode.Function>();
                 HashMap<String, String> keyMap = new HashMap<String, String>();
+                @Override
                 public void visit(ELNode.Function n) throws JasperException {
                     String key = n.getPrefix() + ":" + n.getName();
                     if (! keyMap.containsKey(key)) {
index 8d60c21..166e3a4 100644 (file)
@@ -52,6 +52,7 @@ abstract class ELNode {
         this.type = type;
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -76,6 +77,7 @@ abstract class ELNode {
             this.text = text;
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -97,6 +99,7 @@ abstract class ELNode {
             this.text = text;
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -125,6 +128,7 @@ abstract class ELNode {
             this.name = name;
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
index 045e9ab..10879f4 100644 (file)
@@ -320,6 +320,7 @@ public class ELParser {
             return 0;
         }
 
+        @Override
         public String toString() {
             return "";
         }
@@ -335,6 +336,7 @@ public class ELParser {
             this.id = id;
         }
 
+        @Override
         public String toString() {
             return id;
         }
@@ -351,10 +353,12 @@ public class ELParser {
             this.ch = ch;
         }
 
+        @Override
         char toChar() {
             return ch;
         }
 
+        @Override
         public String toString() {
             return (new Character(ch)).toString();
         }
@@ -371,6 +375,7 @@ public class ELParser {
             this.value = v;
         }
 
+        @Override
         public String toString() {
             return value;
         }
index ae9ee80..882575e 100644 (file)
@@ -594,7 +594,8 @@ public class ErrorDispatcher {
            this.lineNum = lineNum;
        }
 
-       public void doVisit(Node n) throws JasperException {
+       @Override
+    public void doVisit(Node n) throws JasperException {
            if ((lineNum >= n.getBeginJavaLine())
                    && (lineNum < n.getEndJavaLine())) {
                found = n;
index 4e11d40..40002db 100644 (file)
@@ -195,6 +195,7 @@ class Generator {
              * contains more than one page directive with an 'info' attribute,
              * their values match.
              */
+            @Override
             public void visit(Node.PageDirective n) throws JasperException {
 
                 if (getServletInfoGenerated) {
@@ -216,6 +217,7 @@ class Generator {
                 out.println();
             }
 
+            @Override
             public void visit(Node.Declaration n) throws JasperException {
                 n.setBeginJavaLine(out.getJavaLine());
                 out.printMultiLn(new String(n.getText()));
@@ -224,6 +226,7 @@ class Generator {
             }
 
             // Custom Tags may contain declarations from tag plugins.
+            @Override
             public void visit(Node.CustomTag n) throws JasperException {
                 if (n.useTagPlugin()) {
                     if (n.getAtSTag() != null) {
@@ -267,6 +270,7 @@ class Generator {
              * 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()) {
@@ -332,6 +336,7 @@ class Generator {
                 vars = new Vector<String>();
             }
 
+            @Override
             public void visit(Node.CustomTag n) throws JasperException {
 
                 if (n.getCustomNestingLevel() > 0) {
@@ -905,6 +910,7 @@ class Generator {
                     this.separator = separator;
                 }
 
+                @Override
                 public void visit(Node.ParamAction n) throws JasperException {
 
                     out.print(" + ");
@@ -932,6 +938,7 @@ class Generator {
             }
         }
 
+        @Override
         public void visit(Node.Expression n) throws JasperException {
             n.setBeginJavaLine(out.getJavaLine());
             out.printin("out.print(");
@@ -940,6 +947,7 @@ class Generator {
             n.setEndJavaLine(out.getJavaLine());
         }
 
+        @Override
         public void visit(Node.Scriptlet n) throws JasperException {
             n.setBeginJavaLine(out.getJavaLine());
             out.printMultiLn(n.getText());
@@ -947,6 +955,7 @@ class Generator {
             n.setEndJavaLine(out.getJavaLine());
         }
 
+        @Override
         public void visit(Node.ELExpression n) throws JasperException {
             n.setBeginJavaLine(out.getJavaLine());
             if (!pageInfo.isELIgnored() && (n.getEL() != null)) {
@@ -961,6 +970,7 @@ class Generator {
             n.setEndJavaLine(out.getJavaLine());
         }
 
+        @Override
         public void visit(Node.IncludeAction n) throws JasperException {
 
             String flush = n.getTextAttribute("flush");
@@ -1050,6 +1060,7 @@ class Generator {
             return result;
         }
 
+        @Override
         public void visit(Node.ForwardAction n) throws JasperException {
             Node.JspAttribute page = n.getPage();
 
@@ -1094,6 +1105,7 @@ class Generator {
             // XXX Not sure if we can eliminate dead codes after this.
         }
 
+        @Override
         public void visit(Node.GetProperty n) throws JasperException {
             String name = n.getTextAttribute("name");
             String property = n.getTextAttribute("property");
@@ -1139,6 +1151,7 @@ class Generator {
             n.setEndJavaLine(out.getJavaLine());
         }
 
+        @Override
         public void visit(Node.SetProperty n) throws JasperException {
             String name = n.getTextAttribute("name");
             String property = n.getTextAttribute("property");
@@ -1229,6 +1242,7 @@ class Generator {
             n.setEndJavaLine(out.getJavaLine());
         }
 
+        @Override
         public void visit(Node.UseBean n) throws JasperException {
 
             String name = n.getTextAttribute("id");
@@ -1426,6 +1440,7 @@ class Generator {
             return " " + attr + "=\"" + value + '\"';
         }
 
+        @Override
         public void visit(Node.PlugIn n) throws JasperException {
 
             /**
@@ -1439,6 +1454,7 @@ class Generator {
                     this.ie = ie;
                 }
 
+                @Override
                 public void visit(Node.ParamAction n) throws JasperException {
 
                     String name = n.getTextAttribute("name");
@@ -1654,10 +1670,12 @@ class Generator {
             n.setEndJavaLine(out.getJavaLine());
         }
 
+        @Override
         public void visit(Node.NamedAttribute n) throws JasperException {
             // Don't visit body of this tag - we already did earlier.
         }
 
+        @Override
         public void visit(Node.CustomTag n) throws JasperException {
 
             // Use plugin to generate more efficient code if there is one.
@@ -1813,6 +1831,7 @@ class Generator {
 
         private static final String DOUBLE_QUOTE = "\\\"";
 
+        @Override
         public void visit(Node.UninterpretedTag n) throws JasperException {
 
             n.setBeginJavaLine(out.getJavaLine());
@@ -1871,6 +1890,7 @@ class Generator {
             n.setEndJavaLine(out.getJavaLine());
         }
 
+        @Override
         public void visit(Node.JspElement n) throws JasperException {
 
             n.setBeginJavaLine(out.getJavaLine());
@@ -1938,6 +1958,7 @@ class Generator {
             }
         }
 
+        @Override
         public void visit(Node.TemplateText n) throws JasperException {
 
             String text = n.getText();
@@ -2046,6 +2067,7 @@ class Generator {
             n.setEndJavaLine(out.getJavaLine());
         }
 
+        @Override
         public void visit(Node.JspBody n) throws JasperException {
             if (n.getBody() != null) {
                 if (isSimpleTagHandler) {
@@ -2059,6 +2081,7 @@ class Generator {
             }
         }
 
+        @Override
         public void visit(Node.InvokeAction n) throws JasperException {
 
             n.setBeginJavaLine(out.getJavaLine());
@@ -2108,6 +2131,7 @@ class Generator {
             n.setEndJavaLine(out.getJavaLine());
         }
 
+        @Override
         public void visit(Node.DoBodyAction n) throws JasperException {
 
             n.setBeginJavaLine(out.getJavaLine());
@@ -2154,6 +2178,7 @@ class Generator {
             n.setEndJavaLine(out.getJavaLine());
         }
 
+        @Override
         public void visit(Node.AttributeGenerator n) throws JasperException {
             Node.CustomTag tag = n.getTag();
             Node.JspAttribute[] attrs = tag.getJspAttributes();
@@ -3958,6 +3983,7 @@ class Generator {
             return out;
         }
 
+        @Override
         public String toString() {
             return charWriter.toString();
         }
@@ -3977,10 +4003,12 @@ class Generator {
                 try {
                     body.visit(new Node.Visitor() {
 
+                        @Override
                         public void doVisit(Node n) {
                             adjustJavaLine(n, offset);
                         }
 
+                        @Override
                         public void visit(Node.CustomTag n)
                                 throws JasperException {
                             Node.Nodes b = n.getBody();
@@ -4192,6 +4220,7 @@ class Generator {
             out.popIndent();
         }
 
+        @Override
         public String toString() {
             return classBuffer.toString();
         }
index 049b033..a09662d 100644 (file)
@@ -180,6 +180,7 @@ class ImplicitTagLibraryInfo extends TagLibraryInfo {
      * @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) {
 
         TagFileInfo tagFile = super.getTagFile(shortName);
@@ -210,6 +211,7 @@ class ImplicitTagLibraryInfo extends TagLibraryInfo {
         return tagFile;
     }
 
+    @Override
     public TagLibraryInfo[] getTagLibraryInfos() {
         Collection<TagLibraryInfo> coll = pi.getTaglibs();
         return coll.toArray(new TagLibraryInfo[0]);
index 13a0c4f..309681b 100644 (file)
@@ -64,6 +64,7 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
     /** 
      * Compile the servlet from .java file to .class file
      */
+    @Override
     protected void generateClass(String[] smap)
         throws FileNotFoundException, JasperException, Exception {
 
index 8586d5e..3136b0b 100644 (file)
@@ -52,6 +52,7 @@ class JasperTagInfo extends TagInfo {
        return dynamicAttrsMapName;
     }
 
+    @Override
     public boolean hasDynamicAttributes() {
         return dynamicAttrsMapName != null;
     }
index 8379e42..9feb10b 100644 (file)
@@ -257,6 +257,7 @@ class JspDocumentParser
      * corresponding TagLibraryInfo object is added to the set of custom
      * tag libraries.
      */
+    @Override
     public void startElement(
         String uri,
         String localName,
@@ -451,6 +452,7 @@ class JspDocumentParser
      *
      * @throws SAXException
      */
+    @Override
     public void characters(char[] buf, int offset, int len) {
 
         if (charBuffer == null) {
@@ -607,6 +609,7 @@ class JspDocumentParser
     /*
      * Receives notification of the end of an element.
      */
+    @Override
     public void endElement(String uri, String localName, String qName)
         throws SAXException {
 
@@ -671,6 +674,7 @@ class JspDocumentParser
      *
      * @param locator the document locator
      */
+    @Override
     public void setDocumentLocator(Locator locator) {
         this.locator = locator;
     }
@@ -747,6 +751,7 @@ class JspDocumentParser
     /*
      * Receives notification of a non-recoverable error.
      */
+    @Override
     public void fatalError(SAXParseException e) throws SAXException {
         throw e;
     }
@@ -754,6 +759,7 @@ class JspDocumentParser
     /*
      * Receives notification of a recoverable error.
      */
+    @Override
     public void error(SAXParseException e) throws SAXException {
         throw e;
     }
@@ -761,6 +767,7 @@ class JspDocumentParser
     /*
      * Receives notification of the start of a Namespace mapping. 
      */
+    @Override
     public void startPrefixMapping(String prefix, String uri)
         throws SAXException {
         TagLibraryInfo taglibInfo;
@@ -791,6 +798,7 @@ class JspDocumentParser
     /*
      * Receives notification of the end of a Namespace mapping. 
      */
+    @Override
     public void endPrefixMapping(String prefix) throws SAXException {
 
         if (directivesOnly) {
index 2940a91..d3b69ad 100644 (file)
@@ -200,6 +200,7 @@ final class Mark {
         return null;
     }
 
+    @Override
     public String toString() {
        return getFile()+"("+line+","+col+")";
     }
@@ -219,6 +220,7 @@ final class Mark {
         return ctxt.getResource(getFile());
     }
 
+    @Override
     public boolean equals(Object other) {
        if (other instanceof Mark) {
            Mark m = (Mark) other;
index a241a0f..2d4ea9f 100644 (file)
@@ -470,6 +470,7 @@ abstract class Node implements TagConstants {
             parentRoot = (Node.Root) r;
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -559,6 +560,7 @@ abstract class Node implements TagConstants {
                     start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -583,6 +585,7 @@ abstract class Node implements TagConstants {
             imports = new Vector<String>();
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -631,6 +634,7 @@ abstract class Node implements TagConstants {
                     taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -646,6 +650,7 @@ abstract class Node implements TagConstants {
                     start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -669,6 +674,7 @@ abstract class Node implements TagConstants {
             imports = new Vector<String>();
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -718,6 +724,7 @@ abstract class Node implements TagConstants {
                     nonTaglibXmlnsAttrs, taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -740,6 +747,7 @@ abstract class Node implements TagConstants {
                     taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -761,6 +769,7 @@ abstract class Node implements TagConstants {
                     taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -782,6 +791,7 @@ abstract class Node implements TagConstants {
                     taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -796,6 +806,7 @@ abstract class Node implements TagConstants {
             super(null, null, text, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -826,6 +837,7 @@ abstract class Node implements TagConstants {
          * 
          * @return The text string
          */
+        @Override
         public String getText() {
             String ret = text;
             if (ret == null) {
@@ -847,6 +859,7 @@ abstract class Node implements TagConstants {
          * For the same reason as above, the source line information in the
          * contained TemplateText node should be used.
          */
+        @Override
         public Mark getStart() {
             if (text == null && body != null && body.size() > 0) {
                 return body.getNode(0).getStart();
@@ -872,6 +885,7 @@ abstract class Node implements TagConstants {
                     start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -893,6 +907,7 @@ abstract class Node implements TagConstants {
                     start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -913,6 +928,7 @@ abstract class Node implements TagConstants {
                     start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -933,6 +949,7 @@ abstract class Node implements TagConstants {
             this.type = type;
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -968,6 +985,7 @@ abstract class Node implements TagConstants {
                     start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -996,6 +1014,7 @@ abstract class Node implements TagConstants {
                     start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1016,6 +1035,7 @@ abstract class Node implements TagConstants {
                     taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1039,6 +1059,7 @@ abstract class Node implements TagConstants {
                     taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1070,6 +1091,7 @@ abstract class Node implements TagConstants {
                     taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1099,6 +1121,7 @@ abstract class Node implements TagConstants {
                     taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1122,6 +1145,7 @@ abstract class Node implements TagConstants {
                     taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1153,6 +1177,7 @@ abstract class Node implements TagConstants {
                     taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1186,6 +1211,7 @@ abstract class Node implements TagConstants {
                     taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1221,6 +1247,7 @@ abstract class Node implements TagConstants {
                     start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1254,6 +1281,7 @@ abstract class Node implements TagConstants {
                     taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1293,6 +1321,7 @@ abstract class Node implements TagConstants {
                     taglibAttrs, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1505,6 +1534,7 @@ abstract class Node implements TagConstants {
             this.implementsDynamicAttributes = tagInfo.hasDynamicAttributes();
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1792,6 +1822,7 @@ abstract class Node implements TagConstants {
             this.tag = tag;
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1816,6 +1847,7 @@ abstract class Node implements TagConstants {
                     start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1867,6 +1899,7 @@ abstract class Node implements TagConstants {
             }
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1875,6 +1908,7 @@ abstract class Node implements TagConstants {
             return this.name;
         }
 
+        @Override
         public String getLocalName() {
             return this.localName;
         }
@@ -1907,11 +1941,13 @@ abstract class Node implements TagConstants {
          * Since this method is only for attributes that are not rtexpr, we can
          * assume the body of the jsp:attribute is a template text.
          */
+        @Override
         public String getText() {
 
             class AttributeVisitor extends Visitor {
                 String attrValue = null;
 
+                @Override
                 public void visit(TemplateText txt) {
                     attrValue = new String(txt.getText());
                 }
@@ -1956,6 +1992,7 @@ abstract class Node implements TagConstants {
             this.childInfo = new ChildInfo();
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
@@ -1976,6 +2013,7 @@ abstract class Node implements TagConstants {
             super(null, null, text, start, parent);
         }
 
+        @Override
         public void accept(Visitor v) throws JasperException {
             v.visit(this);
         }
index 5aa9b8a..bf722c8 100644 (file)
@@ -81,6 +81,7 @@ class PageDataImpl extends PageData implements TagConstants {
      *
      * @return the input stream of the XML view
      */
+    @Override
     public InputStream getInputStream() {
        // Turn StringBuilder into InputStream
         try {
@@ -123,7 +124,8 @@ class PageDataImpl extends PageData implements TagConstants {
            this.jspIdPrefix = "jsp";
        }
 
-       public void visit(Node.Root n) throws JasperException {
+       @Override
+    public void visit(Node.Root n) throws JasperException {
            visitBody(n);
            if (n == root) {
                /*
@@ -159,7 +161,8 @@ class PageDataImpl extends PageData implements TagConstants {
            }
        }
 
-       public void visit(Node.JspRoot n) throws JasperException {
+       @Override
+    public void visit(Node.JspRoot n) throws JasperException {
            addAttributes(n.getTaglibAttributes());
             addAttributes(n.getNonTaglibXmlnsAttributes());
            addAttributes(n.getAttributes());
@@ -171,7 +174,8 @@ class PageDataImpl extends PageData implements TagConstants {
         * Converts taglib directive into "xmlns:..." attribute of jsp:root
         * element.
         */
-       public void visit(Node.TaglibDirective n) throws JasperException {
+       @Override
+    public void visit(Node.TaglibDirective n) throws JasperException {
            Attributes attrs = n.getAttributes();
            if (attrs != null) {
                String qName = "xmlns:" + attrs.getValue("prefix");
@@ -256,7 +260,8 @@ class PageDataImpl extends PageData implements TagConstants {
        /*
         * Visits root node.
         */
-       public void visit(Node.Root n) throws JasperException {
+       @Override
+    public void visit(Node.Root n) throws JasperException {
            if (n == this.root) {
                // top-level page
                appendXmlProlog();
@@ -277,40 +282,49 @@ class PageDataImpl extends PageData implements TagConstants {
         * Any nested jsp:root elements (from pages included via an
         * include directive) are ignored.
         */
-       public void visit(Node.JspRoot n) throws JasperException {
+       @Override
+    public void visit(Node.JspRoot n) throws JasperException {
            visitBody(n);
        }
 
-       public void visit(Node.PageDirective n) throws JasperException {
+       @Override
+    public void visit(Node.PageDirective n) throws JasperException {
            appendPageDirective(n);
        }
 
-       public void visit(Node.IncludeDirective n) throws JasperException {
+       @Override
+    public void visit(Node.IncludeDirective n) throws JasperException {
            // expand in place
            visitBody(n);
        }
 
-       public void visit(Node.Comment n) throws JasperException {
+       @Override
+    public void visit(Node.Comment n) throws JasperException {
            // Comments are ignored in XML view
        }
 
-       public void visit(Node.Declaration n) throws JasperException {
+       @Override
+    public void visit(Node.Declaration n) throws JasperException {
            appendTag(n);
        }
 
-       public void visit(Node.Expression n) throws JasperException {
+       @Override
+    public void visit(Node.Expression n) throws JasperException {
            appendTag(n);
        }
 
-       public void visit(Node.Scriptlet n) throws JasperException {
+       @Override
+    public void visit(Node.Scriptlet n) throws JasperException {
            appendTag(n);
        }
 
-       public void visit(Node.JspElement n) throws JasperException {
+       @Override
+    public void visit(Node.JspElement n) throws JasperException {
            appendTag(n);
        }
 
-       public void visit(Node.ELExpression n) throws JasperException {
+       @Override
+    public void visit(Node.ELExpression n) throws JasperException {
            if (!n.getRoot().isXmlSyntax()) {
                buf.append("<").append(JSP_TEXT_ACTION);
                buf.append(" ");
@@ -327,87 +341,107 @@ class PageDataImpl extends PageData implements TagConstants {
            buf.append("\n");
        }
 
-       public void visit(Node.IncludeAction n) throws JasperException {
+       @Override
+    public void visit(Node.IncludeAction n) throws JasperException {
            appendTag(n);
        }
     
-       public void visit(Node.ForwardAction n) throws JasperException {
+       @Override
+    public void visit(Node.ForwardAction n) throws JasperException {
            appendTag(n);
        }
 
-       public void visit(Node.GetProperty n) throws JasperException {
+       @Override
+    public void visit(Node.GetProperty n) throws JasperException {
            appendTag(n);
        }
 
-       public void visit(Node.SetProperty n) throws JasperException {
+       @Override
+    public void visit(Node.SetProperty n) throws JasperException {
            appendTag(n);
        }
 
-       public void visit(Node.ParamAction n) throws JasperException {
+       @Override
+    public void visit(Node.ParamAction n) throws JasperException {
            appendTag(n);
        }
 
-       public void visit(Node.ParamsAction n) throws JasperException {
+       @Override
+    public void visit(Node.ParamsAction n) throws JasperException {
            appendTag(n);
        }
 
-       public void visit(Node.FallBackAction n) throws JasperException {
+       @Override
+    public void visit(Node.FallBackAction n) throws JasperException {
            appendTag(n);
        }
 
-       public void visit(Node.UseBean n) throws JasperException {
+       @Override
+    public void visit(Node.UseBean n) throws JasperException {
            appendTag(n);
        }
        
-       public void visit(Node.PlugIn n) throws JasperException {
+       @Override
+    public void visit(Node.PlugIn n) throws JasperException {
            appendTag(n);
        }
 
+        @Override
         public void visit(Node.NamedAttribute n) throws JasperException {
             appendTag(n);
         }
         
+        @Override
         public void visit(Node.JspBody n) throws JasperException {
             appendTag(n);
         }
 
-       public void visit(Node.CustomTag n) throws JasperException {
+       @Override
+    public void visit(Node.CustomTag n) throws JasperException {
            boolean resetDefaultNSSave = resetDefaultNS;
            appendTag(n, resetDefaultNS);
            resetDefaultNS = resetDefaultNSSave;
        }
 
-       public void visit(Node.UninterpretedTag n) throws JasperException {
+       @Override
+    public void visit(Node.UninterpretedTag n) throws JasperException {
            boolean resetDefaultNSSave = resetDefaultNS;
            appendTag(n, resetDefaultNS);
            resetDefaultNS = resetDefaultNSSave;
        }
 
-       public void visit(Node.JspText n) throws JasperException {
+       @Override
+    public void visit(Node.JspText n) throws JasperException {
            appendTag(n);
        }
 
-       public void visit(Node.DoBodyAction n) throws JasperException {
+       @Override
+    public void visit(Node.DoBodyAction n) throws JasperException {
            appendTag(n);
        }
 
+        @Override
         public void visit(Node.InvokeAction n) throws JasperException {
            appendTag(n);
        }
 
-       public void visit(Node.TagDirective n) throws JasperException {
+       @Override
+    public void visit(Node.TagDirective n) throws JasperException {
            appendTagDirective(n);
        }
 
-       public void visit(Node.AttributeDirective n) throws JasperException {
+       @Override
+    public void visit(Node.AttributeDirective n) throws JasperException {
            appendTag(n);
        }
 
-       public void visit(Node.VariableDirective n) throws JasperException {
+       @Override
+    public void visit(Node.VariableDirective n) throws JasperException {
            appendTag(n);
        }
         
-       public void visit(Node.TemplateText n) throws JasperException {
+       @Override
+    public void visit(Node.TemplateText n) throws JasperException {
            /*
             * If the template text came from a JSP page written in JSP syntax,
             * create a jsp:text element for it (JSP 5.3.2).
index b9cce77..4a2f91e 100644 (file)
@@ -41,7 +41,8 @@ class ScriptingVariabler {
        private int count;
        private Node.CustomTag parent;
 
-       public void visit(Node.CustomTag n) throws JasperException {
+       @Override
+    public void visit(Node.CustomTag n) throws JasperException {
            n.setCustomTagParent(parent);
            Node.CustomTag tmpParent = parent;
            parent = n;
@@ -65,7 +66,8 @@ class ScriptingVariabler {
            scriptVars = new Hashtable<String,Integer>();
        }
 
-       public void visit(Node.CustomTag n) throws JasperException {
+       @Override
+    public void visit(Node.CustomTag n) throws JasperException {
            setScriptingVars(n, VariableInfo.AT_BEGIN);
            setScriptingVars(n, VariableInfo.NESTED);
            new ScriptingVariableVisitor(err).visitBody(n);
index 21b559c..2c92bae 100644 (file)
@@ -139,6 +139,7 @@ public class SmapGenerator {
        return out.toString();
     }
 
+    @Override
     public String toString() { return getString(); }
 
     //*********************************************************************
index 74942a9..9b1fc09 100644 (file)
@@ -106,6 +106,7 @@ public class SmapStratum {
             return out.toString();
         }
 
+        @Override
         public String toString() {
             return getString();
         }
@@ -329,6 +330,7 @@ public class SmapStratum {
         return out.toString();
     }
 
+    @Override
     public String toString() {
         return getString();
     }
index 767e3dc..6f5ff34 100644 (file)
@@ -503,6 +503,7 @@ public class SmapUtil {
             this.innerClassMap = map;
         }
 
+        @Override
         public void visitBody(Node n) throws JasperException {
             SmapStratum smapSave = smap;
             String innerClass = n.getInnerClassName();
@@ -513,91 +514,110 @@ public class SmapUtil {
             smap = smapSave;
         }
 
+        @Override
         public void visit(Node.Declaration n) throws JasperException {
             doSmapText(n);
         }
 
+        @Override
         public void visit(Node.Expression n) throws JasperException {
             doSmapText(n);
         }
 
+        @Override
         public void visit(Node.Scriptlet n) throws JasperException {
             doSmapText(n);
         }
 
+        @Override
         public void visit(Node.IncludeAction n) throws JasperException {
             doSmap(n);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.ForwardAction n) throws JasperException {
             doSmap(n);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.GetProperty n) throws JasperException {
             doSmap(n);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.SetProperty n) throws JasperException {
             doSmap(n);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.UseBean n) throws JasperException {
             doSmap(n);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.PlugIn n) throws JasperException {
             doSmap(n);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.CustomTag n) throws JasperException {
             doSmap(n);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.UninterpretedTag n) throws JasperException {
             doSmap(n);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.JspElement n) throws JasperException {
             doSmap(n);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.JspText n) throws JasperException {
             doSmap(n);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.NamedAttribute n) throws JasperException {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.JspBody n) throws JasperException {
             doSmap(n);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.InvokeAction n) throws JasperException {
             doSmap(n);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.DoBodyAction n) throws JasperException {
             doSmap(n);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.ELExpression n) throws JasperException {
             doSmap(n);
         }
 
+        @Override
         public void visit(Node.TemplateText n) throws JasperException {
             Mark mark = n.getStart();
             if (mark == null) {
@@ -702,6 +722,7 @@ public class SmapUtil {
 
         HashMap<String, SmapStratum> map = new HashMap<String, SmapStratum>();
 
+        @Override
         public void doVisit(Node n) {
             String inner = n.getInnerClassName();
             if (inner != null && !map.containsKey(inner)) {
index ed3a1e6..e1fd86c 100644 (file)
@@ -146,6 +146,7 @@ class TagFileProcessor {
             variableVector = new Vector<TagVariableInfo>();
         }
 
+        @Override
         public void visit(Node.TagDirective n) throws JasperException {
 
             JspUtil.checkAttributes("Tag directive", n, tagDirectiveAttrs, err);
@@ -188,6 +189,7 @@ class TagFileProcessor {
             return result;
         }
 
+        @Override
         public void visit(Node.AttributeDirective n) throws JasperException {
 
             JspUtil.checkAttributes("Attribute directive", n,
@@ -287,6 +289,7 @@ class TagFileProcessor {
             checkUniqueName(attrName, ATTR_NAME, n, tagAttributeInfo);
         }
 
+        @Override
         public void visit(Node.VariableDirective n) throws JasperException {
 
             JspUtil.checkAttributes("Variable directive", n,
@@ -637,6 +640,7 @@ class TagFileProcessor {
             this.pageInfo = compiler.getPageInfo();
         }
 
+        @Override
         public void visit(Node.CustomTag n) throws JasperException {
             TagFileInfo tagFileInfo = n.getTagFileInfo();
             if (tagFileInfo != null) {
index 63725b3..2fc299a 100644 (file)
@@ -83,6 +83,7 @@ class TagLibraryInfoImpl extends TagLibraryInfo implements TagConstants {
         }
     }
 
+    @Override
     public String toString() {
         StringWriter sw = new StringWriter();
         PrintWriter out = new PrintWriter(sw);
@@ -205,6 +206,7 @@ class TagLibraryInfoImpl extends TagLibraryInfo implements TagConstants {
 
     }
 
+    @Override
     public TagLibraryInfo[] getTagLibraryInfos() {
         Collection<TagLibraryInfo> coll = pi.getTaglibs();
         return coll.toArray(new TagLibraryInfo[0]);
index 926f3df..c50fb3d 100644 (file)
@@ -57,6 +57,7 @@ public class TagPluginManager {
        this.pageInfo = pageInfo;
 
         page.visit(new Node.Visitor() {
+            @Override
             public void visit(Node.CustomTag n)
                     throws JasperException {
                 invokePlugin(n);
index 380cdff..8221fbc 100644 (file)
@@ -40,6 +40,7 @@ public class TextOptimizer {
             pageInfo = compiler.getPageInfo();
         }
 
+        @Override
         public void doVisit(Node n) throws JasperException {
             collectText();
         }
@@ -48,29 +49,36 @@ public class TextOptimizer {
          * The following directis are ignored in text concatenation
          */
 
+        @Override
         public void visit(Node.PageDirective n) throws JasperException {
         }
 
+        @Override
         public void visit(Node.TagDirective n) throws JasperException {
         }
 
+        @Override
         public void visit(Node.TaglibDirective n) throws JasperException {
         }
 
+        @Override
         public void visit(Node.AttributeDirective n) throws JasperException {
         }
 
+        @Override
         public void visit(Node.VariableDirective n) throws JasperException {
         }
 
         /*
          * Don't concatenate text across body boundaries
          */
+        @Override
         public void visitBody(Node n) throws JasperException {
             super.visitBody(n);
             collectText();
         }
 
+        @Override
         public void visit(Node.TemplateText n) throws JasperException {
             if ((options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces()) 
                     && n.isAllSpace()) {
index 5597355..81a0f5e 100644 (file)
@@ -90,6 +90,7 @@ class Validator {
             this.err = compiler.getErrorDispatcher();
         }
 
+        @Override
         public void visit(Node.IncludeDirective n) throws JasperException {
             // Since pageDirectiveSeen flag only applies to the Current page
             // save it here and restore it after the file is included.
@@ -99,6 +100,7 @@ class Validator {
             pageEncodingSeen = pageEncodingSeenSave;
         }
 
+        @Override
         public void visit(Node.PageDirective n) throws JasperException {
 
             JspUtil.checkAttributes("Page directive", n, pageDirectiveAttrs,
@@ -233,6 +235,7 @@ class Validator {
             pageInfo.addImports(n.getImports());
         }
 
+        @Override
         public void visit(Node.TagDirective n) throws JasperException {
             // Note: Most of the validation is done in TagFileProcessor
             // when it created a TagInfo object from the
@@ -300,12 +303,14 @@ class Validator {
             pageInfo.addImports(n.getImports());
         }
 
+        @Override
         public void visit(Node.AttributeDirective n) throws JasperException {
             // Do nothing, since this attribute directive has already been
             // validated by TagFileProcessor when it created a TagInfo object
             // from the tag file in which the directive appeared
         }
 
+        @Override
         public void visit(Node.VariableDirective n) throws JasperException {
             // Do nothing, since this variable directive has already been
             // validated by TagFileProcessor when it created a TagInfo object
@@ -506,6 +511,7 @@ class Validator {
             this.loader = compiler.getCompilationContext().getClassLoader();
         }
 
+        @Override
         public void visit(Node.JspRoot n) throws JasperException {
             JspUtil.checkAttributes("Jsp:root", n, jspRootAttrs, err);
             String version = n.getTextAttribute("version");
@@ -515,12 +521,14 @@ class Validator {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.IncludeDirective n) throws JasperException {
             JspUtil.checkAttributes("Include directive", n,
                     includeDirectiveAttrs, err);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.TaglibDirective n) throws JasperException {
             JspUtil.checkAttributes("Taglib directive", n,
                     taglibDirectiveAttrs, err);
@@ -537,6 +545,7 @@ class Validator {
             }
         }
 
+        @Override
         public void visit(Node.ParamAction n) throws JasperException {
             JspUtil.checkAttributes("Param action", n, paramActionAttrs, err);
             // make sure the value of the 'name' attribute is not a
@@ -547,6 +556,7 @@ class Validator {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.ParamsAction n) throws JasperException {
             // Make sure we've got at least one nested jsp:param
             Node.Nodes subElems = n.getBody();
@@ -556,6 +566,7 @@ class Validator {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.IncludeAction n) throws JasperException {
             JspUtil.checkAttributes("Include action", n, includeActionAttrs,
                     err);
@@ -564,6 +575,7 @@ class Validator {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.ForwardAction n) throws JasperException {
             JspUtil.checkAttributes("Forward", n, forwardActionAttrs, err);
             n.setPage(getJspAttribute(null, "page", null, null, n
@@ -571,10 +583,12 @@ class Validator {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.GetProperty n) throws JasperException {
             JspUtil.checkAttributes("GetProperty", n, getPropertyAttrs, err);
         }
 
+        @Override
         public void visit(Node.SetProperty n) throws JasperException {
             JspUtil.checkAttributes("SetProperty", n, setPropertyAttrs, err);
             String property = n.getTextAttribute("property");
@@ -597,6 +611,7 @@ class Validator {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.UseBean n) throws JasperException {
             JspUtil.checkAttributes("UseBean", n, useBeanAttrs, err);
 
@@ -630,6 +645,7 @@ class Validator {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.PlugIn n) throws JasperException {
             JspUtil.checkAttributes("Plugin", n, plugInAttrs, err);
 
@@ -664,33 +680,39 @@ class Validator {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.NamedAttribute n) throws JasperException {
             JspUtil.checkAttributes("Attribute", n, attributeAttrs, err);
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.JspBody n) throws JasperException {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.Declaration n) throws JasperException {
             if (pageInfo.isScriptingInvalid()) {
                 err.jspError(n.getStart(), "jsp.error.no.scriptlets");
             }
         }
 
+        @Override
         public void visit(Node.Expression n) throws JasperException {
             if (pageInfo.isScriptingInvalid()) {
                 err.jspError(n.getStart(), "jsp.error.no.scriptlets");
             }
         }
 
+        @Override
         public void visit(Node.Scriptlet n) throws JasperException {
             if (pageInfo.isScriptingInvalid()) {
                 err.jspError(n.getStart(), "jsp.error.no.scriptlets");
             }
         }
 
+        @Override
         public void visit(Node.ELExpression n) throws JasperException {
             // exit if we are ignoring EL all together
             if (pageInfo.isELIgnored())
@@ -721,6 +743,7 @@ class Validator {
             n.setEL(el);
         }
 
+        @Override
         public void visit(Node.UninterpretedTag n) throws JasperException {
             if (n.getNamedAttributeNodes().size() != 0) {
                 err.jspError(n, "jsp.error.namedAttribute.invalidUse");
@@ -773,6 +796,7 @@ class Validator {
             return false;
         }
 
+        @Override
         public void visit(Node.CustomTag n) throws JasperException {
 
             TagInfo tagInfo = n.getTagInfo();
@@ -863,6 +887,7 @@ class Validator {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.JspElement n) throws JasperException {
 
             Attributes attrs = n.getAttributes();
@@ -911,6 +936,7 @@ class Validator {
             visitBody(n);
         }
 
+        @Override
         public void visit(Node.JspOutput n) throws JasperException {
             JspUtil.checkAttributes("jsp:output", n, jspOutputAttrs, err);
 
@@ -975,6 +1001,7 @@ class Validator {
             }
         }
 
+        @Override
         public void visit(Node.InvokeAction n) throws JasperException {
 
             JspUtil.checkAttributes("Invoke", n, invokeAttrs, err);
@@ -992,6 +1019,7 @@ class Validator {
             }
         }
 
+        @Override
         public void visit(Node.DoBodyAction n) throws JasperException {
 
             JspUtil.checkAttributes("DoBody", n, doBodyAttrs, err);
@@ -1418,6 +1446,7 @@ class Validator {
         private static class NamedAttributeVisitor extends Node.Visitor {
             private boolean hasDynamicContent;
 
+            @Override
             public void doVisit(Node n) throws JasperException {
                 if (!(n instanceof Node.JspText)
                         && !(n instanceof Node.TemplateText)) {
@@ -1468,6 +1497,7 @@ class Validator {
                     this.n = n;
                 }
 
+                @Override
                 public void visit(ELNode.Function func) throws JasperException {
                     String prefix = func.getPrefix();
                     String function = func.getName();
@@ -1599,6 +1629,7 @@ class Validator {
                     fnmap.put(fnQName, method);
                 }
 
+                @Override
                 public Method resolveFunction(String prefix, String localName) {
                     return this.fnmap.get(prefix + ":" + localName);
                 }
@@ -1611,6 +1642,7 @@ class Validator {
                     this.fmapper = fmapper;
                 }
 
+                @Override
                 public void visit(ELNode.Function n) throws JasperException {
 
                     Class<?> c = null;
@@ -1666,6 +1698,7 @@ class Validator {
             this.err = compiler.getErrorDispatcher();
         }
 
+        @Override
         public void visit(Node.CustomTag n) throws JasperException {
             TagInfo tagInfo = n.getTagInfo();
             if (tagInfo == null) {
index f79955a..ccc296e 100644 (file)
@@ -36,6 +36,7 @@ import org.apache.jasper.Constants;
 public final class ELContextImpl extends ELContext {
 
     private final static FunctionMapper NullFunctionMapper = new FunctionMapper() {
+        @Override
         public Method resolveFunction(String prefix, String localName) {
             return null;
         }
@@ -45,6 +46,7 @@ public final class ELContextImpl extends ELContext {
 
         private Map<String, ValueExpression> vars;
 
+        @Override
         public ValueExpression resolveVariable(String variable) {
             if (vars == null) {
                 return null;
@@ -52,6 +54,7 @@ public final class ELContextImpl extends ELContext {
             return vars.get(variable);
         }
 
+        @Override
         public ValueExpression setVariable(String variable,
                 ValueExpression expression) {
             if (vars == null)
@@ -71,6 +74,7 @@ public final class ELContextImpl extends ELContext {
         this(ELResolverImpl.getDefaultResolver());
         if (Constants.IS_SECURITY_ENABLED) {
             functionMapper = new FunctionMapper() {
+                @Override
                 public Method resolveFunction(String prefix, String localName) {
                     return null;
                 }
@@ -84,14 +88,17 @@ public final class ELContextImpl extends ELContext {
         this.resolver = resolver;
     }
 
+    @Override
     public ELResolver getELResolver() {
         return this.resolver;
     }
 
+    @Override
     public FunctionMapper getFunctionMapper() {
         return this.functionMapper;
     }
 
+    @Override
     public VariableMapper getVariableMapper() {
         if (this.variableMapper == null) {
             this.variableMapper = new VariableMapperImpl();
index a0754c3..80e0a96 100644 (file)
@@ -38,39 +38,48 @@ public final class ELContextWrapper extends ELContext {
         this.fnMapper = fnMapper;
     }
 
+    @Override
     public ELResolver getELResolver() {
         return this.target.getELResolver();
     }
 
+    @Override
     public FunctionMapper getFunctionMapper() {
         if (this.fnMapper != null) return this.fnMapper;
         return this.target.getFunctionMapper();
     }
 
+    @Override
     public VariableMapper getVariableMapper() {
         return this.target.getVariableMapper();
     }
 
+    @Override
     public Object getContext(Class key) {
         return this.target.getContext(key);
     }
 
+    @Override
     public Locale getLocale() {
         return this.target.getLocale();
     }
 
+    @Override
     public boolean isPropertyResolved() {
         return this.target.isPropertyResolved();
     }
 
+    @Override
     public void putContext(Class key, Object contextObject) throws NullPointerException {
         this.target.putContext(key, contextObject);
     }
 
+    @Override
     public void setLocale(Locale locale) {
         this.target.setLocale(locale);
     }
 
+    @Override
     public void setPropertyResolved(boolean resolved) {
         this.target.setPropertyResolved(resolved);
     }
index fcea32a..70dca5a 100644 (file)
@@ -51,7 +51,8 @@ public final class ELResolverImpl extends ELResolver {
                this.variableResolver = variableResolver;
        }
 
-       public Object getValue(ELContext context, Object base, Object property)
+       @Override
+    public Object getValue(ELContext context, Object base, Object property)
                        throws NullPointerException, PropertyNotFoundException, ELException {
                if (context == null) {
                        throw new NullPointerException();
@@ -75,7 +76,8 @@ public final class ELResolverImpl extends ELResolver {
                return null;
        }
 
-       public Class<?> getType(ELContext context, Object base, Object property)
+       @Override
+    public Class<?> getType(ELContext context, Object base, Object property)
                        throws NullPointerException, PropertyNotFoundException, ELException {
                if (context == null) {
                        throw new NullPointerException();
@@ -100,7 +102,8 @@ public final class ELResolverImpl extends ELResolver {
                return null;
        }
 
-       public void setValue(ELContext context, Object base, Object property,
+       @Override
+    public void setValue(ELContext context, Object base, Object property,
                        Object value) throws NullPointerException,
                        PropertyNotFoundException, PropertyNotWritableException,
                        ELException {
@@ -119,7 +122,8 @@ public final class ELResolverImpl extends ELResolver {
                }
        }
 
-       public boolean isReadOnly(ELContext context, Object base, Object property)
+       @Override
+    public boolean isReadOnly(ELContext context, Object base, Object property)
                        throws NullPointerException, PropertyNotFoundException, ELException {
                if (context == null) {
                        throw new NullPointerException();
@@ -133,11 +137,13 @@ public final class ELResolverImpl extends ELResolver {
                return getDefaultResolver().isReadOnly(context, base, property);
        }
 
-       public Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+       @Override
+    public Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
                return getDefaultResolver().getFeatureDescriptors(context, base);
        }
 
-       public Class<?> getCommonPropertyType(ELContext context, Object base) {
+       @Override
+    public Class<?> getCommonPropertyType(ELContext context, Object base) {
                if (base == null) {
                        return String.class;
                }
index b0c11d7..4260cc7 100644 (file)
@@ -34,7 +34,8 @@ public final class ExpressionEvaluatorImpl extends ExpressionEvaluator {
                this.factory = factory;
        }
 
-       public Expression parseExpression(String expression, Class<?> expectedType,
+       @Override
+    public Expression parseExpression(String expression, Class<?> expectedType,
                        FunctionMapper fMapper) throws ELException {
                try {
                        ELContextImpl ctx =
@@ -49,7 +50,8 @@ public final class ExpressionEvaluatorImpl extends ExpressionEvaluator {
                }
        }
 
-       public Object evaluate(String expression, Class<?> expectedType,
+       @Override
+    public Object evaluate(String expression, Class<?> expectedType,
                        VariableResolver vResolver, FunctionMapper fMapper)
                        throws ELException {
                return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
index 107326d..82623fd 100644 (file)
@@ -30,7 +30,8 @@ public final class ExpressionImpl extends Expression {
                this.ve = ve;
        }
 
-       public Object evaluate(VariableResolver vResolver) throws ELException {
+       @Override
+    public Object evaluate(VariableResolver vResolver) throws ELException {
                ELContext ctx = new ELContextImpl(new ELResolverImpl(vResolver));
                return ve.getValue(ctx);
        }
index 0cf84ec..7e69332 100644 (file)
@@ -28,7 +28,8 @@ public final class FunctionMapperImpl extends javax.el.FunctionMapper {
                this.fnMapper = fnMapper;
        }
 
-       public Method resolveFunction(String prefix, String localName) {
+       @Override
+    public Method resolveFunction(String prefix, String localName) {
                return this.fnMapper.resolveFunction(prefix, localName);
        }
 
index b48e003..9de7f00 100644 (file)
@@ -44,6 +44,7 @@ public final class JspMethodExpression extends MethodExpression implements
         this.mark = mark;
     }
 
+    @Override
     public MethodInfo getMethodInfo(ELContext context)
             throws NullPointerException, PropertyNotFoundException,
             MethodNotFoundException, ELException {
@@ -61,6 +62,7 @@ public final class JspMethodExpression extends MethodExpression implements
         }
     }
 
+    @Override
     public Object invoke(ELContext context, Object[] params)
             throws NullPointerException, PropertyNotFoundException,
             MethodNotFoundException, ELException {
@@ -78,18 +80,22 @@ public final class JspMethodExpression extends MethodExpression implements
         }
     }
 
+    @Override
     public boolean equals(Object obj) {
         return this.target.equals(obj);
     }
 
+    @Override
     public int hashCode() {
         return this.target.hashCode();
     }
 
+    @Override
     public String getExpressionString() {
         return this.target.getExpressionString();
     }
 
+    @Override
     public boolean isLiteralText() {
         return this.target.isLiteralText();
     }
index d8c32a0..dccafba 100644 (file)
@@ -48,10 +48,12 @@ public final class JspValueExpression extends ValueExpression implements
         this.mark = mark;
     }
 
+    @Override
     public Class<?> getExpectedType() {
         return this.target.getExpectedType();
     }
 
+    @Override
     public Class<?> getType(ELContext context) throws NullPointerException,
             PropertyNotFoundException, ELException {
         try {
@@ -65,6 +67,7 @@ public final class JspValueExpression extends ValueExpression implements
         }
     }
 
+    @Override
     public boolean isReadOnly(ELContext context) throws NullPointerException,
             PropertyNotFoundException, ELException {
         try {
@@ -78,6 +81,7 @@ public final class JspValueExpression extends ValueExpression implements
         }
     }
 
+    @Override
     public void setValue(ELContext context, Object value)
             throws NullPointerException, PropertyNotFoundException,
             PropertyNotWritableException, ELException {
@@ -95,6 +99,7 @@ public final class JspValueExpression extends ValueExpression implements
         }
     }
 
+    @Override
     public Object getValue(ELContext context) throws NullPointerException,
             PropertyNotFoundException, ELException {
         try {
@@ -108,18 +113,22 @@ public final class JspValueExpression extends ValueExpression implements
         }
     }
 
+    @Override
     public boolean equals(Object obj) {
         return this.target.equals(obj);
     }
 
+    @Override
     public int hashCode() {
         return this.target.hashCode();
     }
 
+    @Override
     public String getExpressionString() {
         return this.target.getExpressionString();
     }
 
+    @Override
     public boolean isLiteralText() {
         return this.target.isLiteralText();
     }
index 1c2a8e7..d99a4f7 100644 (file)
@@ -65,6 +65,7 @@ public class BodyContentImpl extends BodyContent {
     /**
      * Write a single character.
      */
+    @Override
     public void write(int c) throws IOException {
         if (writer != null) {
             writer.write(c);
@@ -92,6 +93,7 @@ public class BodyContentImpl extends BodyContent {
      * @param off Offset from which to start reading characters
      * @param len Number of characters to write
      */
+    @Override
     public void write(char[] cbuf, int off, int len) throws IOException {
         if (writer != null) {
             writer.write(cbuf, off, len);
@@ -117,6 +119,7 @@ public class BodyContentImpl extends BodyContent {
      * Write an array of characters.  This method cannot be inherited from the
      * Writer class because it must suppress I/O exceptions.
      */
+    @Override
     public void write(char[] buf) throws IOException {
         if (writer != null) {
             writer.write(buf);
@@ -132,6 +135,7 @@ public class BodyContentImpl extends BodyContent {
      * @param off Offset from which to start reading characters
      * @param len Number of characters to be written
      */
+    @Override
     public void write(String s, int off, int len) throws IOException {
         if (writer != null) {
             writer.write(s, off, len);
@@ -149,6 +153,7 @@ public class BodyContentImpl extends BodyContent {
      * Write a string.  This method cannot be inherited from the Writer class
      * because it must suppress I/O exceptions.
      */
+    @Override
     public void write(String s) throws IOException {
         if (writer != null) {
             writer.write(s);
@@ -164,6 +169,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException If an I/O error occurs
      */
+    @Override
     public void newLine() throws IOException {
         if (writer != null) {
             writer.write(LINE_SEPARATOR);
@@ -182,6 +188,7 @@ public class BodyContentImpl extends BodyContent {
      * @param b The <code>boolean</code> to be printed
      * @throws IOException
      */
+    @Override
     public void print(boolean b) throws IOException {
         if (writer != null) {
             writer.write(b ? "true" : "false");
@@ -199,6 +206,7 @@ public class BodyContentImpl extends BodyContent {
      * @param c The <code>char</code> to be printed
      * @throws IOException
      */
+    @Override
     public void print(char c) throws IOException {
         if (writer != null) {
             writer.write(String.valueOf(c));
@@ -217,6 +225,7 @@ public class BodyContentImpl extends BodyContent {
      * @param i The <code>int</code> to be printed
      * @throws IOException
      */
+    @Override
     public void print(int i) throws IOException {
         if (writer != null) {
             writer.write(String.valueOf(i));
@@ -235,6 +244,7 @@ public class BodyContentImpl extends BodyContent {
      * @param l The <code>long</code> to be printed
      * @throws IOException
      */
+    @Override
     public void print(long l) throws IOException {
         if (writer != null) {
             writer.write(String.valueOf(l));
@@ -253,6 +263,7 @@ public class BodyContentImpl extends BodyContent {
      * @param f The <code>float</code> to be printed
      * @throws IOException
      */
+    @Override
     public void print(float f) throws IOException {
         if (writer != null) {
             writer.write(String.valueOf(f));
@@ -271,6 +282,7 @@ public class BodyContentImpl extends BodyContent {
      * @param d The <code>double</code> to be printed
      * @throws IOException
      */
+    @Override
     public void print(double d) throws IOException {
         if (writer != null) {
             writer.write(String.valueOf(d));
@@ -290,6 +302,7 @@ public class BodyContentImpl extends BodyContent {
      * @throws NullPointerException If <code>s</code> is <code>null</code>
      * @throws IOException
      */
+    @Override
     public void print(char[] s) throws IOException {
         if (writer != null) {
             writer.write(s);
@@ -308,6 +321,7 @@ public class BodyContentImpl extends BodyContent {
      * @param s The <code>String</code> to be printed
      * @throws IOException
      */
+    @Override
     public void print(String s) throws IOException {
         if (s == null) s = "null";
         if (writer != null) {
@@ -327,6 +341,7 @@ public class BodyContentImpl extends BodyContent {
      * @param obj The <code>Object</code> to be printed
      * @throws IOException
      */
+    @Override
     public void print(Object obj) throws IOException {
         if (writer != null) {
             writer.write(String.valueOf(obj));
@@ -343,6 +358,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException
      */
+    @Override
     public void println() throws IOException {
         newLine();
     }
@@ -354,6 +370,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException
      */
+    @Override
     public void println(boolean x) throws IOException {
         print(x);
         println();
@@ -366,6 +383,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException
      */
+    @Override
     public void println(char x) throws IOException {
         print(x);
         println();
@@ -378,6 +396,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException
      */
+    @Override
     public void println(int x) throws IOException {
         print(x);
         println();
@@ -390,6 +409,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException
      */
+    @Override
     public void println(long x) throws IOException {
         print(x);
         println();
@@ -402,6 +422,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException
      */
+    @Override
     public void println(float x) throws IOException {
         print(x);
         println();
@@ -414,6 +435,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException
      */
+    @Override
     public void println(double x) throws IOException{
         print(x);
         println();
@@ -426,6 +448,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException
      */
+    @Override
     public void println(char x[]) throws IOException {
         print(x);
         println();
@@ -438,6 +461,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException
      */
+    @Override
     public void println(String x) throws IOException {
         print(x);
         println();
@@ -450,6 +474,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException
      */
+    @Override
     public void println(Object x) throws IOException {
         print(x);
         println();
@@ -463,6 +488,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException If an I/O error occurs
      */
+    @Override
     public void clear() throws IOException {
         if (writer != null) {
             throw new IOException();
@@ -483,6 +509,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException If an I/O error occurs
      */
+    @Override
     public void clearBuffer() throws IOException {
         if (writer == null) {
             this.clear();
@@ -496,6 +523,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @throws IOException If an I/O error occurs
      */
+    @Override
     public void close() throws IOException {
         if (writer != null) {
             writer.close();
@@ -509,6 +537,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @return the size of the buffer in bytes, or 0 is unbuffered.
      */
+    @Override
     public int getBufferSize() {
         // According to the spec, the JspWriter returned by 
         // JspContext.pushBody(java.io.Writer writer) must behave as
@@ -520,6 +549,7 @@ public class BodyContentImpl extends BodyContent {
     /**
      * @return the number of bytes unused in the buffer
      */
+    @Override
     public int getRemaining() {
         return (writer == null) ? bufferSize-nextChar : 0;
     }
@@ -531,6 +561,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @return the value of this BodyJspWriter as a Reader
      */
+    @Override
     public Reader getReader() {
         return (writer == null) ? new CharArrayReader (cb, 0, nextChar) : null;
     }
@@ -542,6 +573,7 @@ public class BodyContentImpl extends BodyContent {
      *
      * @return the value of the BodyJspWriter as a String
      */
+    @Override
     public String getString() {
         return (writer == null) ? new String(cb, 0, nextChar) : null;
     }
@@ -554,6 +586,7 @@ public class BodyContentImpl extends BodyContent {
      * @param out The writer into which to place the contents of this body
      * evaluation
      */
+    @Override
     public void writeOut(Writer out) throws IOException {
         if (writer == null) {
             out.write(cb, 0, nextChar);
index 4acc0e4..207e670 100644 (file)
@@ -43,6 +43,7 @@ public abstract class HttpJspBase
     protected HttpJspBase() {
     }
 
+    @Override
     public final void init(ServletConfig config) 
        throws ServletException 
     {
@@ -51,10 +52,12 @@ public abstract class HttpJspBase
         _jspInit();
     }
     
+    @Override
     public String getServletInfo() {
        return Localizer.getMessage("jsp.engine.info");
     }
 
+    @Override
     public final void destroy() {
        jspDestroy();
        _jspDestroy();
@@ -63,6 +66,7 @@ public abstract class HttpJspBase
     /**
      * Entry point into service.
      */
+    @Override
     public final void service(HttpServletRequest request, HttpServletResponse response) 
        throws ServletException, IOException 
     {
index 11a3b21..81ef9a4 100644 (file)
@@ -93,13 +93,15 @@ public class JspContextWrapper extends PageContext implements VariableResolver {
                syncBeginTagFile();
        }
 
-       public void initialize(Servlet servlet, ServletRequest request,
+       @Override
+    public void initialize(Servlet servlet, ServletRequest request,
                        ServletResponse response, String errorPageURL,
                        boolean needsSession, int bufferSize, boolean autoFlush)
                        throws IOException, IllegalStateException, IllegalArgumentException {
        }
 
-       public Object getAttribute(String name) {
+       @Override
+    public Object getAttribute(String name) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -109,7 +111,8 @@ public class JspContextWrapper extends PageContext implements VariableResolver {
                return pageAttributes.get(name);
        }
 
-       public Object getAttribute(String name, int scope) {
+       @Override
+    public Object getAttribute(String name, int scope) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -123,7 +126,8 @@ public class JspContextWrapper extends PageContext implements VariableResolver {
                return invokingJspCtxt.getAttribute(name, scope);
        }
 
-       public void setAttribute(String name, Object value) {
+       @Override
+    public void setAttribute(String name, Object value) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -137,7 +141,8 @@ public class JspContextWrapper extends PageContext implements VariableResolver {
                }
        }
 
-       public void setAttribute(String name, Object value, int scope) {
+       @Override
+    public void setAttribute(String name, Object value, int scope) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -155,7 +160,8 @@ public class JspContextWrapper extends PageContext implements VariableResolver {
                }
        }
 
-       public Object findAttribute(String name) {
+       @Override
+    public Object findAttribute(String name) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -178,7 +184,8 @@ public class JspContextWrapper extends PageContext implements VariableResolver {
                return o;
        }
 
-       public void removeAttribute(String name) {
+       @Override
+    public void removeAttribute(String name) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -193,7 +200,8 @@ public class JspContextWrapper extends PageContext implements VariableResolver {
                invokingJspCtxt.removeAttribute(name, APPLICATION_SCOPE);
        }
 
-       public void removeAttribute(String name, int scope) {
+       @Override
+    public void removeAttribute(String name, int scope) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -207,7 +215,8 @@ public class JspContextWrapper extends PageContext implements VariableResolver {
                }
        }
 
-       public int getAttributesScope(String name) {
+       @Override
+    public int getAttributesScope(String name) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -221,7 +230,8 @@ public class JspContextWrapper extends PageContext implements VariableResolver {
                }
        }
 
-       public Enumeration<String> getAttributeNamesInScope(int scope) {
+       @Override
+    public Enumeration<String> getAttributeNamesInScope(int scope) {
                if (scope == PAGE_SCOPE) {
                        return new Enumerator<String>(pageAttributes.keySet().iterator());
                }
@@ -229,85 +239,104 @@ public class JspContextWrapper extends PageContext implements VariableResolver {
                return invokingJspCtxt.getAttributeNamesInScope(scope);
        }
 
-       public void release() {
+       @Override
+    public void release() {
                invokingJspCtxt.release();
        }
 
-       public JspWriter getOut() {
+       @Override
+    public JspWriter getOut() {
                return invokingJspCtxt.getOut();
        }
 
-       public HttpSession getSession() {
+       @Override
+    public HttpSession getSession() {
                return invokingJspCtxt.getSession();
        }
 
-       public Object getPage() {
+       @Override
+    public Object getPage() {
                return invokingJspCtxt.getPage();
        }
 
-       public ServletRequest getRequest() {
+       @Override
+    public ServletRequest getRequest() {
                return invokingJspCtxt.getRequest();
        }
 
-       public ServletResponse getResponse() {
+       @Override
+    public ServletResponse getResponse() {
                return invokingJspCtxt.getResponse();
        }
 
-       public Exception getException() {
+       @Override
+    public Exception getException() {
                return invokingJspCtxt.getException();
        }
 
-       public ServletConfig getServletConfig() {
+       @Override
+    public ServletConfig getServletConfig() {
                return invokingJspCtxt.getServletConfig();
        }
 
-       public ServletContext getServletContext() {
+       @Override
+    public ServletContext getServletContext() {
                return invokingJspCtxt.getServletContext();
        }
 
-       public void forward(String relativeUrlPath) throws ServletException,
+       @Override
+    public void forward(String relativeUrlPath) throws ServletException,
                        IOException {
                invokingJspCtxt.forward(relativeUrlPath);
        }
 
-       public void include(String relativeUrlPath) throws ServletException,
+       @Override
+    public void include(String relativeUrlPath) throws ServletException,
                        IOException {
                invokingJspCtxt.include(relativeUrlPath);
        }
 
-       public void include(String relativeUrlPath, boolean flush)
+       @Override
+    public void include(String relativeUrlPath, boolean flush)
                        throws ServletException, IOException {
                invokingJspCtxt.include(relativeUrlPath, false);
        }
 
-       public VariableResolver getVariableResolver() {
+       @Override
+    public VariableResolver getVariableResolver() {
                return this;
        }
 
-       public BodyContent pushBody() {
+       @Override
+    public BodyContent pushBody() {
                return invokingJspCtxt.pushBody();
        }
 
-       public JspWriter pushBody(Writer writer) {
+       @Override
+    public JspWriter pushBody(Writer writer) {
                return invokingJspCtxt.pushBody(writer);
        }
 
-       public JspWriter popBody() {
+       @Override
+    public JspWriter popBody() {
                return invokingJspCtxt.popBody();
        }
 
-       public ExpressionEvaluator getExpressionEvaluator() {
+       @Override
+    public ExpressionEvaluator getExpressionEvaluator() {
                return invokingJspCtxt.getExpressionEvaluator();
        }
 
-       public void handlePageException(Exception ex) throws IOException,
+       @Override
+    public void handlePageException(Exception ex) throws IOException,
                        ServletException {
                // Should never be called since handleException() called with a
                // Throwable in the generated servlet.
                handlePageException((Throwable) ex);
        }
 
-       public void handlePageException(Throwable t) throws IOException,
+       @Override
+    public void handlePageException(Throwable t) throws IOException,
                        ServletException {
                invokingJspCtxt.handlePageException(t);
        }
@@ -444,7 +473,8 @@ public class JspContextWrapper extends PageContext implements VariableResolver {
 
        //private ELContextImpl elContext;
 
-       public ELContext getELContext() {
+       @Override
+    public ELContext getELContext() {
         // instead decorate!!!
         
         return this.invokingJspCtxt.getELContext();
index 2415175..3378ae0 100644 (file)
@@ -50,6 +50,7 @@ public class JspFactoryImpl extends JspFactory {
 
     private ThreadLocal<PageContextPool> localPool = new ThreadLocal<PageContextPool>();
 
+    @Override
     public PageContext getPageContext(Servlet servlet, ServletRequest request,
             ServletResponse response, String errorPageURL, boolean needsSession,
             int bufferSize, boolean autoflush) {
@@ -66,6 +67,7 @@ public class JspFactoryImpl extends JspFactory {
         }
     }
 
+    @Override
     public void releasePageContext(PageContext pc) {
         if( pc == null )
             return;
@@ -78,8 +80,10 @@ public class JspFactoryImpl extends JspFactory {
         }
     }
 
+    @Override
     public JspEngineInfo getEngineInfo() {
         return new JspEngineInfo() {
+            @Override
             public String getSpecificationVersion() {
                 return SPEC_VERSION;
             }
@@ -198,6 +202,7 @@ public class JspFactoryImpl extends JspFactory {
 
     }
 
+    @Override
     public JspApplicationContext getJspApplicationContext(
             final ServletContext context) {
         if (Constants.IS_SECURITY_ENABLED) {
index 38d26d3..f0054bb 100644 (file)
@@ -54,6 +54,7 @@ public abstract class JspFragmentHelper
         this.parentTag = parentTag;
     }
     
+    @Override
     public JspContext getJspContext() {
         return this.jspContext;
     }
index 823b6f5..acdeaac 100644 (file)
@@ -141,6 +141,7 @@ public class JspWriterImpl extends JspWriter {
     /**
      * Discard the output buffer.
      */
+    @Override
     public final void clear() throws IOException {
         if ((bufferSize == 0) && (out != null))
             // clear() is illegal after any unbuffered output (JSP.5.5)
@@ -153,6 +154,7 @@ public class JspWriterImpl extends JspWriter {
         nextChar = 0;
     }
     
+    @Override
     public void clearBuffer() throws IOException {
         if (bufferSize == 0)
             throw new IllegalStateException(
@@ -169,6 +171,7 @@ public class JspWriterImpl extends JspWriter {
      * Flush the stream.
      *
      */
+    @Override
     public void flush()  throws IOException {
         flushBuffer();
         if (out != null) {
@@ -180,6 +183,7 @@ public class JspWriterImpl extends JspWriter {
      * Close the stream.
      *
      */
+    @Override
     public void close() throws IOException {
         if (response == null || closed)
             // multiple calls to close is OK
@@ -194,6 +198,7 @@ public class JspWriterImpl extends JspWriter {
     /**
      * @return the number of bytes unused in the buffer
      */
+    @Override
     public int getRemaining() {
         return bufferSize - nextChar;
     }
@@ -208,6 +213,7 @@ public class JspWriterImpl extends JspWriter {
     /**
      * Write a single character.
      */
+    @Override
     public void write(int c) throws IOException {
         ensureOpen();
         if (bufferSize == 0) {
@@ -247,6 +253,7 @@ public class JspWriterImpl extends JspWriter {
      * @param  off   Offset from which to start reading characters
      * @param  len   Number of characters to write
      */
+    @Override
     public void write(char cbuf[], int off, int len) 
     throws IOException 
     {
@@ -297,6 +304,7 @@ public class JspWriterImpl extends JspWriter {
      * Write an array of characters.  This method cannot be inherited from the
      * Writer class because it must suppress I/O exceptions.
      */
+    @Override
     public void write(char buf[]) throws IOException {
         write(buf, 0, buf.length);
     }
@@ -308,6 +316,7 @@ public class JspWriterImpl extends JspWriter {
      * @param  off   Offset from which to start reading characters
      * @param  len   Number of characters to be written
      */
+    @Override
     public void write(String s, int off, int len) throws IOException {
         ensureOpen();
         if (bufferSize == 0) {
@@ -333,6 +342,7 @@ public class JspWriterImpl extends JspWriter {
      * Write a string.  This method cannot be inherited from the Writer class
      * because it must suppress I/O exceptions.
      */
+    @Override
     public void write(String s) throws IOException {
         // Simple fix for Bugzilla 35410
         // Calling the other write function so as to init the buffer anyways
@@ -354,6 +364,7 @@ public class JspWriterImpl extends JspWriter {
      * @exception  IOException  If an I/O error occurs
      */
     
+    @Override
     public void newLine() throws IOException {
         write(lineSeparator);
     }
@@ -370,6 +381,7 @@ public class JspWriterImpl extends JspWriter {
      *
      * @param      b   The <code>boolean</code> to be printed
      */
+    @Override
     public void print(boolean b) throws IOException {
         write(b ? "true" : "false");
     }
@@ -382,6 +394,7 @@ public class JspWriterImpl extends JspWriter {
      *
      * @param      c   The <code>char</code> to be printed
      */
+    @Override
     public void print(char c) throws IOException {
         write(String.valueOf(c));
     }
@@ -395,6 +408,7 @@ public class JspWriterImpl extends JspWriter {
      *
      * @param      i   The <code>int</code> to be printed
      */
+    @Override
     public void print(int i) throws IOException {
         write(String.valueOf(i));
     }
@@ -408,6 +422,7 @@ public class JspWriterImpl extends JspWriter {
      *
      * @param      l   The <code>long</code> to be printed
      */
+    @Override
     public void print(long l) throws IOException {
         write(String.valueOf(l));
     }
@@ -421,6 +436,7 @@ public class JspWriterImpl extends JspWriter {
      *
      * @param      f   The <code>float</code> to be printed
      */
+    @Override
     public void print(float f) throws IOException {
         write(String.valueOf(f));
     }
@@ -434,6 +450,7 @@ public class JspWriterImpl extends JspWriter {
      *
      * @param      d   The <code>double</code> to be printed
      */
+    @Override
     public void print(double d) throws IOException {
         write(String.valueOf(d));
     }
@@ -448,6 +465,7 @@ public class JspWriterImpl extends JspWriter {
      *
      * @throws  NullPointerException  If <code>s</code> is <code>null</code>
      */
+    @Override
     public void print(char s[]) throws IOException {
         write(s);
     }
@@ -461,6 +479,7 @@ public class JspWriterImpl extends JspWriter {
      *
      * @param      s   The <code>String</code> to be printed
      */
+    @Override
     public void print(String s) throws IOException {
         if (s == null) {
             s = "null";
@@ -477,6 +496,7 @@ public class JspWriterImpl extends JspWriter {
      *
      * @param      obj   The <code>Object</code> to be printed
      */
+    @Override
     public void print(Object obj) throws IOException {
         write(String.valueOf(obj));
     }
@@ -493,6 +513,7 @@ public class JspWriterImpl extends JspWriter {
      * println() writes  to the sink directly instead of through the
      * write method...  
      */
+    @Override
     public void println() throws IOException {
         newLine();
     }
@@ -502,6 +523,7 @@ public class JspWriterImpl extends JspWriter {
      * as though it invokes <code>{@link #print(boolean)}</code> and then
      * <code>{@link #println()}</code>.
      */
+    @Override
     public void println(boolean x) throws IOException {
         print(x);
         println();
@@ -512,6 +534,7 @@ public class JspWriterImpl extends JspWriter {
      * though it invokes <code>{@link #print(char)}</code> and then <code>{@link
      * #println()}</code>.
      */
+    @Override
     public void println(char x) throws IOException {
         print(x);
         println();
@@ -522,6 +545,7 @@ public class JspWriterImpl extends JspWriter {
      * though it invokes <code>{@link #print(int)}</code> and then <code>{@link
      * #println()}</code>.
      */
+    @Override
     public void println(int x) throws IOException {
         print(x);
         println();
@@ -532,6 +556,7 @@ public class JspWriterImpl extends JspWriter {
      * as though it invokes <code>{@link #print(long)}</code> and then
      * <code>{@link #println()}</code>.
      */
+    @Override
     public void println(long x) throws IOException {
         print(x);
         println();
@@ -542,6 +567,7 @@ public class JspWriterImpl extends JspWriter {
      * behaves as though it invokes <code>{@link #print(float)}</code> and then
      * <code>{@link #println()}</code>.
      */
+    @Override
     public void println(float x) throws IOException {
         print(x);
         println();
@@ -552,6 +578,7 @@ public class JspWriterImpl extends JspWriter {
      * line.  This method behaves as though it invokes <code>{@link
      * #print(double)}</code> and then <code>{@link #println()}</code>.
      */
+    @Override
     public void println(double x) throws IOException {
         print(x);
         println();
@@ -562,6 +589,7 @@ public class JspWriterImpl extends JspWriter {
      * behaves as though it invokes <code>{@link #print(char[])}</code> and then
      * <code>{@link #println()}</code>.
      */
+    @Override
     public void println(char x[]) throws IOException {
         print(x);
         println();
@@ -572,6 +600,7 @@ public class JspWriterImpl extends JspWriter {
      * though it invokes <code>{@link #print(String)}</code> and then
      * <code>{@link #println()}</code>.
      */
+    @Override
     public void println(String x) throws IOException {
         print(x);
         println();
@@ -582,6 +611,7 @@ public class JspWriterImpl extends JspWriter {
      * though it invokes <code>{@link #print(Object)}</code> and then
      * <code>{@link #println()}</code>.
      */
+    @Override
     public void println(Object x) throws IOException {
         print(x);
         println();
index 6e01523..f9eafa7 100644 (file)
@@ -116,7 +116,8 @@ public class PageContextImpl extends PageContext {
                this.depth = -1;
        }
 
-       public void initialize(Servlet servlet, ServletRequest request,
+       @Override
+    public void initialize(Servlet servlet, ServletRequest request,
                        ServletResponse response, String errorPageURL,
                        boolean needsSession, int bufferSize, boolean autoFlush)
                        throws IOException {
@@ -173,7 +174,8 @@ public class PageContextImpl extends PageContext {
                isIncluded = request.getAttribute("javax.servlet.include.servlet_path") != null;
        }
 
-       public void release() {
+       @Override
+    public void release() {
                out = baseOut;
                try {
                        if (isIncluded) {
@@ -206,7 +208,8 @@ public class PageContextImpl extends PageContext {
         }
        }
 
-       public Object getAttribute(final String name) {
+       @Override
+    public Object getAttribute(final String name) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -230,7 +233,8 @@ public class PageContextImpl extends PageContext {
                return attributes.get(name);
        }
 
-       public Object getAttribute(final String name, final int scope) {
+       @Override
+    public Object getAttribute(final String name, final int scope) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -273,7 +277,8 @@ public class PageContextImpl extends PageContext {
                }
        }
 
-       public void setAttribute(final String name, final Object attribute) {
+       @Override
+    public void setAttribute(final String name, final Object attribute) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -300,7 +305,8 @@ public class PageContextImpl extends PageContext {
                }
        }
 
-       public void setAttribute(final String name, final Object o, final int scope) {
+       @Override
+    public void setAttribute(final String name, final Object o, final int scope) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -351,7 +357,8 @@ public class PageContextImpl extends PageContext {
                }
        }
 
-       public void removeAttribute(final String name, final int scope) {
+       @Override
+    public void removeAttribute(final String name, final int scope) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -396,7 +403,8 @@ public class PageContextImpl extends PageContext {
                }
        }
 
-       public int getAttributesScope(final String name) {
+       @Override
+    public int getAttributesScope(final String name) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -438,7 +446,8 @@ public class PageContextImpl extends PageContext {
                return 0;
        }
 
-       public Object findAttribute(final String name) {
+       @Override
+    public Object findAttribute(final String name) {
                if (SecurityUtil.isPackageProtectionEnabled()) {
                        return AccessController.doPrivileged(
                                new PrivilegedAction<Object>() {
@@ -485,7 +494,8 @@ public class PageContextImpl extends PageContext {
                return context.getAttribute(name);
        }
 
-       public Enumeration<String> getAttributeNamesInScope(final int scope) {
+       @Override
+    public Enumeration<String> getAttributeNamesInScope(final int scope) {
                if (SecurityUtil.isPackageProtectionEnabled()) {
                        return AccessController.doPrivileged(
                                new PrivilegedAction<Enumeration<String>>() {
@@ -521,7 +531,8 @@ public class PageContextImpl extends PageContext {
                }
        }
 
-       public void removeAttribute(final String name) {
+       @Override
+    public void removeAttribute(final String name) {
 
                if (name == null) {
                        throw new NullPointerException(Localizer
@@ -554,11 +565,13 @@ public class PageContextImpl extends PageContext {
            removeAttribute(name, APPLICATION_SCOPE);
        }
 
-       public JspWriter getOut() {
+       @Override
+    public JspWriter getOut() {
                return out;
        }
 
-       public HttpSession getSession() {
+       @Override
+    public HttpSession getSession() {
                return session;
        }
 
@@ -566,19 +579,23 @@ public class PageContextImpl extends PageContext {
                return servlet;
        }
 
-       public ServletConfig getServletConfig() {
+       @Override
+    public ServletConfig getServletConfig() {
                return config;
        }
 
-       public ServletContext getServletContext() {
+       @Override
+    public ServletContext getServletContext() {
                return config.getServletContext();
        }
 
-       public ServletRequest getRequest() {
+       @Override
+    public ServletRequest getRequest() {
                return request;
        }
 
-       public ServletResponse getResponse() {
+       @Override
+    public ServletResponse getResponse() {
                return response;
        }
 
@@ -589,7 +606,8 @@ public class PageContextImpl extends PageContext {
         * 
         * @return The Exception associated with this page context, if any.
         */
-       public Exception getException() {
+       @Override
+    public Exception getException() {
                Throwable t = JspRuntimeLibrary.getThrowable(request);
 
                // Only wrap if needed
@@ -600,7 +618,8 @@ public class PageContextImpl extends PageContext {
                return (Exception) t;
        }
 
-       public Object getPage() {
+       @Override
+    public Object getPage() {
                return servlet;
        }
 
@@ -619,13 +638,15 @@ public class PageContextImpl extends PageContext {
                return path;
        }
 
-       public void include(String relativeUrlPath) throws ServletException,
+       @Override
+    public void include(String relativeUrlPath) throws ServletException,
                        IOException {
                JspRuntimeLibrary
                                .include(request, response, relativeUrlPath, out, true);
        }
 
-       public void include(final String relativeUrlPath, final boolean flush)
+       @Override
+    public void include(final String relativeUrlPath, final boolean flush)
                        throws ServletException, IOException {
                if (SecurityUtil.isPackageProtectionEnabled()) {
                        try {
@@ -655,11 +676,13 @@ public class PageContextImpl extends PageContext {
                                flush);
        }
 
-       public VariableResolver getVariableResolver() {
+       @Override
+    public VariableResolver getVariableResolver() {
                return new VariableResolverImpl(this.getELContext());
        }
 
-       public void forward(final String relativeUrlPath) throws ServletException,
+       @Override
+    public void forward(final String relativeUrlPath) throws ServletException,
                        IOException {
                if (SecurityUtil.isPackageProtectionEnabled()) {
                        try {
@@ -715,11 +738,13 @@ public class PageContextImpl extends PageContext {
                }
        }
 
-       public BodyContent pushBody() {
+       @Override
+    public BodyContent pushBody() {
                return (BodyContent) pushBody(null);
        }
 
-       public JspWriter pushBody(Writer writer) {
+       @Override
+    public JspWriter pushBody(Writer writer) {
                depth++;
                if (depth >= outs.length) {
                        BodyContentImpl[] newOuts = new BodyContentImpl[depth + 1];
@@ -740,7 +765,8 @@ public class PageContextImpl extends PageContext {
                return outs[depth];
        }
 
-       public JspWriter popBody() {
+       @Override
+    public JspWriter popBody() {
                depth--;
                if (depth >= 0) {
                        out = outs[depth];
@@ -760,18 +786,21 @@ public class PageContextImpl extends PageContext {
         * Container must return a valid instance of an ExpressionEvaluator that can
         * parse EL expressions.
         */
-       public ExpressionEvaluator getExpressionEvaluator() {
+       @Override
+    public ExpressionEvaluator getExpressionEvaluator() {
                return new ExpressionEvaluatorImpl(this.applicationContext.getExpressionFactory());
        }
 
-       public void handlePageException(Exception ex) throws IOException,
+       @Override
+    public void handlePageException(Exception ex) throws IOException,
                        ServletException {
                // Should never be called since handleException() called with a
                // Throwable in the generated servlet.
                handlePageException((Throwable) ex);
        }
 
-       public void handlePageException(final Throwable t) throws IOException,
+       @Override
+    public void handlePageException(final Throwable t) throws IOException,
                        ServletException {
                if (t == null)
                        throw new NullPointerException("null Throwable");
@@ -947,7 +976,8 @@ public class PageContextImpl extends PageContext {
                return retValue;
        }
 
-       public ELContext getELContext() {
+       @Override
+    public ELContext getELContext() {
                if (this.elContext == null) {
                        this.elContext = this.applicationContext.createELContext(this);
                }
index 2d0892f..7e363e8 100644 (file)
@@ -54,6 +54,7 @@ public class PerThreadTagHandlerPool extends TagHandlerPool {
         perThreadDataVector = new Vector<PerThreadData>();
     }
 
+    @Override
     protected void init(ServletConfig config) {
         maxSize = Constants.MAX_POOL_SIZE;
         String maxSizeS = getOption(config, OPTION_MAXSIZE, null);
@@ -65,6 +66,7 @@ public class PerThreadTagHandlerPool extends TagHandlerPool {
         }
 
         perThread = new ThreadLocal<PerThreadData>() {
+            @Override
             protected PerThreadData initialValue() {
                 PerThreadData ptd = new PerThreadData();
                 ptd.handlers = new Tag[maxSize];
@@ -85,6 +87,7 @@ public class PerThreadTagHandlerPool extends TagHandlerPool {
      *
      * @throws JspException if a tag handler cannot be instantiated
      */
+    @Override
     public Tag get(Class<? extends Tag> handlerClass) throws JspException {
         PerThreadData ptd = perThread.get();
         if(ptd.current >=0 ) {
@@ -105,6 +108,7 @@ public class PerThreadTagHandlerPool extends TagHandlerPool {
      *
      * @param handler Tag handler to add to this tag handler pool
      */
+    @Override
     public void reuse(Tag handler) {
         PerThreadData ptd = perThread.get();
        if (ptd.current < (ptd.handlers.length - 1)) {
@@ -117,6 +121,7 @@ public class PerThreadTagHandlerPool extends TagHandlerPool {
     /**
      * Calls the release() method of all tag handlers in this tag handler pool.
      */
+    @Override
     public void release() {        
         Enumeration<PerThreadData> enumeration = perThreadDataVector.elements();
         while (enumeration.hasMoreElements()) {
index 8a1d141..725714f 100644 (file)
@@ -185,6 +185,7 @@ public final class ProtectedFunctionMapper extends javax.el.FunctionMapper
      *            the short name of the function
      * @return the result of the method mapping. Null means no entry found.
      */
+    @Override
     public Method resolveFunction(String prefix, String localName) {
         if (this.fnmap != null) {
             return this.fnmap.get(prefix + ":" + localName);
index 098e703..85725ee 100644 (file)
@@ -55,10 +55,12 @@ public class ServletResponseWrapperInclude extends HttpServletResponseWrapper {
     /**
      * Returns a wrapper around the JspWriter of the including page.
      */
+    @Override
     public PrintWriter getWriter() throws IOException {
        return printWriter;
     }
 
+    @Override
     public ServletOutputStream getOutputStream() throws IOException {
        throw new IllegalStateException();
     }
@@ -67,6 +69,7 @@ public class ServletResponseWrapperInclude extends HttpServletResponseWrapper {
      * Clears the output buffer of the JspWriter associated with the including
      * page.
      */
+    @Override
     public void resetBuffer() {
        try {
            jspWriter.clearBuffer();
index 5cb49ca..8261040 100644 (file)
@@ -57,6 +57,7 @@ public class JasperLoader extends URLClassLoader {
      *
      * @exception ClassNotFoundException if the class was not found
      */
+    @Override
     public Class<?> loadClass(String name) throws ClassNotFoundException {
 
         return (loadClass(name, false));
@@ -87,6 +88,7 @@ public class JasperLoader extends URLClassLoader {
      *                                     
      * @exception ClassNotFoundException if the class was not found
      */                                    
+    @Override
     public Class<?> loadClass(final String name, boolean resolve)
         throws ClassNotFoundException {
 
@@ -136,6 +138,7 @@ public class JasperLoader extends URLClassLoader {
      * 
      * @see java.lang.ClassLoader#getResourceAsStream(java.lang.String)
      */
+    @Override
     public InputStream getResourceAsStream(String name) {
         InputStream is = parent.getResourceAsStream(name);
         if (is == null) {
@@ -162,6 +165,7 @@ public class JasperLoader extends URLClassLoader {
      * @param codeSource Code source where the code was loaded from
      * @return PermissionCollection for CodeSource
      */
+    @Override
     public final PermissionCollection getPermissions(CodeSource codeSource) {
         return permissionCollection;
     }
index a0ed3e0..862a8e4 100644 (file)
@@ -69,6 +69,7 @@ public class JspServlet extends HttpServlet implements PeriodicEventListener {
     /*
      * Initializes this JspServlet.
      */
+    @Override
     public void init(ServletConfig config) throws ServletException {
         
         super.init(config);
@@ -208,6 +209,7 @@ public class JspServlet extends HttpServlet implements PeriodicEventListener {
     }
     
 
+    @Override
     public void service (HttpServletRequest request, 
                         HttpServletResponse response)
                 throws ServletException, IOException {
@@ -273,6 +275,7 @@ public class JspServlet extends HttpServlet implements PeriodicEventListener {
 
     }
 
+    @Override
     public void destroy() {
         if (log.isDebugEnabled()) {
             log.debug("JspServlet.destroy()");
index 1e4e287..55c1a22 100644 (file)
@@ -256,6 +256,7 @@ public class Util {
         private StringWriter sw = new StringWriter();
         private ByteArrayOutputStream bos = new ByteArrayOutputStream();
         private ServletOutputStream sos = new ServletOutputStream() {
+            @Override
             public void write(int b) throws IOException {
                 bos.write(b);
             }
@@ -270,6 +271,7 @@ public class Util {
             // TODO Auto-generated constructor stub
         }
         
+        @Override
         public PrintWriter getWriter() {
             if (isStreamUsed)
                 throw new IllegalStateException("Unexpected internal error during &lt;import&gt: " +
@@ -278,6 +280,7 @@ public class Util {
             return new PrintWriter(sw);
         }
         
+        @Override
         public ServletOutputStream getOutputStream() {
             if (isWriterUsed)
                 throw new IllegalStateException("Unexpected internal error during &lt;import&gt: " +
@@ -287,19 +290,23 @@ public class Util {
         }
         
         /** Has no effect. */
+        @Override
         public void setContentType(String x) {
             // ignore
         }
         
         /** Has no effect. */
+        @Override
         public void setLocale(Locale x) {
             // ignore
         }
         
+        @Override
         public void setStatus(int status) {
             this.status = status;
         }
         
+        @Override
         public int getStatus() {
             return status;
         }
index 7c3ca2d..3c145bd 100644 (file)
@@ -83,6 +83,7 @@ public class ASCIIReader
      *
      * @exception  IOException  If an I/O error occurs
      */
+    @Override
     public int read() throws IOException {
         int b0 = fInputStream.read();
         if (b0 > 0x80) {
@@ -106,6 +107,7 @@ public class ASCIIReader
      *
      * @exception  IOException  If an I/O error occurs
      */
+    @Override
     public int read(char ch[], int offset, int length) throws IOException {
         if (length > fBuffer.length) {
             length = fBuffer.length;
@@ -132,6 +134,7 @@ public class ASCIIReader
      *
      * @exception  IOException  If an I/O error occurs
      */
+    @Override
     public long skip(long n) throws IOException {
         return fInputStream.skip(n);
     } // skip(long):long
@@ -145,6 +148,7 @@ public class ASCIIReader
      *
      * @exception  IOException  If an I/O error occurs
      */
+    @Override
     public boolean ready() throws IOException {
        return false;
     } // ready()
@@ -152,6 +156,7 @@ public class ASCIIReader
     /**
      * Tell whether this stream supports the mark() operation.
      */
+    @Override
     public boolean markSupported() {
        return fInputStream.markSupported();
     } // markSupported()
@@ -169,6 +174,7 @@ public class ASCIIReader
      * @exception  IOException  If the stream does not support mark(),
      *                          or if some other I/O error occurs
      */
+    @Override
     public void mark(int readAheadLimit) throws IOException {
        fInputStream.mark(readAheadLimit);
     } // mark(int)
@@ -186,6 +192,7 @@ public class ASCIIReader
      *                          or if the stream does not support reset(),
      *                          or if some other I/O error occurs
      */
+    @Override
     public void reset() throws IOException {
         fInputStream.reset();
     } // reset()
@@ -197,7 +204,8 @@ public class ASCIIReader
      *
      * @exception  IOException  If an I/O error occurs
      */
-     public void close() throws IOException {
+     @Override
+    public void close() throws IOException {
          fInputStream.close();
      } // close()
 
index e00bb25..67a0c5c 100644 (file)
@@ -294,6 +294,7 @@ public class TreeNode {
     /**
      * Return a String representation of this TreeNode.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder();
index 8f3de57..d989b99 100644 (file)
@@ -110,6 +110,7 @@ public class UCSReader extends Reader {
      *
      * @exception  IOException  If an I/O error occurs
      */
+    @Override
     public int read() throws IOException { 
         int b0 = fInputStream.read() & 0xff;
         if (b0 == 0xff)
@@ -152,6 +153,7 @@ public class UCSReader extends Reader {
      *
      * @exception  IOException  If an I/O error occurs
      */
+    @Override
     public int read(char ch[], int offset, int length) throws IOException {
         int byteLength = length << ((fEncoding >= 4)?2:1);
         if (byteLength > fBuffer.length) {
@@ -220,6 +222,7 @@ public class UCSReader extends Reader {
      *
      * @exception  IOException  If an I/O error occurs
      */
+    @Override
     public long skip(long n) throws IOException {
         // charWidth will represent the number of bits to move
         // n leftward to get num of bytes to skip, and then move the result rightward
@@ -242,6 +245,7 @@ public class UCSReader extends Reader {
      *
      * @exception  IOException  If an I/O error occurs
      */
+    @Override
     public boolean ready() throws IOException {
        return false;
     } // ready()
@@ -249,6 +253,7 @@ public class UCSReader extends Reader {
     /**
      * Tell whether this stream supports the mark() operation.
      */
+    @Override
     public boolean markSupported() {
        return fInputStream.markSupported();
     } // markSupported()
@@ -266,6 +271,7 @@ public class UCSReader extends Reader {
      * @exception  IOException  If the stream does not support mark(),
      *                          or if some other I/O error occurs
      */
+    @Override
     public void mark(int readAheadLimit) throws IOException {
        fInputStream.mark(readAheadLimit);
     } // mark(int)
@@ -283,6 +289,7 @@ public class UCSReader extends Reader {
      *                          or if the stream does not support reset(),
      *                          or if some other I/O error occurs
      */
+    @Override
     public void reset() throws IOException {
         fInputStream.reset();
     } // reset()
@@ -294,7 +301,8 @@ public class UCSReader extends Reader {
      *
      * @exception  IOException  If an I/O error occurs
      */
-     public void close() throws IOException {
+     @Override
+    public void close() throws IOException {
          fInputStream.close();
      } // close()
 
index b4d3ba3..b92287d 100644 (file)
@@ -95,6 +95,7 @@ public class UTF8Reader
      *
      * @exception  IOException  If an I/O error occurs
      */
+    @Override
     public int read() throws IOException {
 
         // decode character
@@ -230,6 +231,7 @@ public class UTF8Reader
      *
      * @exception  IOException  If an I/O error occurs
      */
+    @Override
     public int read(char ch[], int offset, int length) throws IOException {
 
         // handle surrogate
@@ -511,6 +513,7 @@ public class UTF8Reader
      *
      * @exception  IOException  If an I/O error occurs
      */
+    @Override
     public long skip(long n) throws IOException {
 
         long remaining = n;
@@ -540,6 +543,7 @@ public class UTF8Reader
      *
      * @exception  IOException  If an I/O error occurs
      */
+    @Override
     public boolean ready() throws IOException {
            return false;
     } // ready()
@@ -547,6 +551,7 @@ public class UTF8Reader
     /**
      * Tell whether this stream supports the mark() operation.
      */
+    @Override
     public boolean markSupported() {
            return false;
     } // markSupported()
@@ -564,6 +569,7 @@ public class UTF8Reader
      * @exception  IOException  If the stream does not support mark(),
      *                          or if some other I/O error occurs
      */
+    @Override
     public void mark(int readAheadLimit) throws IOException {
        throw new IOException(
                 Localizer.getMessage("jsp.error.xml.operationNotSupported",
@@ -583,6 +589,7 @@ public class UTF8Reader
      *                          or if the stream does not support reset(),
      *                          or if some other I/O error occurs
      */
+    @Override
     public void reset() throws IOException {
         fOffset = 0;
         fSurrogate = -1;
@@ -595,6 +602,7 @@ public class UTF8Reader
      *
      * @exception  IOException  If an I/O error occurs
      */
+    @Override
     public void close() throws IOException {
         fInputStream.close();
     } // close()
index 7acef65..19911c5 100644 (file)
@@ -1092,6 +1092,7 @@ public class XMLEncodingDetector {
             fOffset = fStartOffset;
         }
 
+        @Override
         public int read() throws IOException {
             int b = 0;
             if (fOffset < fLength) {
@@ -1115,6 +1116,7 @@ public class XMLEncodingDetector {
             return b & 0xff;
         }
 
+        @Override
         public int read(byte[] b, int off, int len) throws IOException {
             int bytesLeft = fLength - fOffset;
             if (bytesLeft == 0) {
@@ -1148,6 +1150,7 @@ public class XMLEncodingDetector {
             return len;
         }
 
+        @Override
         public long skip(long n)
             throws IOException
         {
@@ -1182,6 +1185,7 @@ public class XMLEncodingDetector {
             return fInputStream.skip(n) + bytesLeft;
         }
 
+        @Override
         public int available() throws IOException {
             int bytesLeft = fLength - fOffset;
             if (bytesLeft == 0) {
@@ -1194,18 +1198,22 @@ public class XMLEncodingDetector {
             return bytesLeft;
         }
 
+        @Override
         public void mark(int howMuch) {
             fMark = fOffset;
         }
 
+        @Override
         public void reset() {
             fOffset = fMark;
         }
 
+        @Override
         public boolean markSupported() {
             return true;
         }
 
+        @Override
         public void close() throws IOException {
             if (fInputStream != null) {
                 fInputStream.close();
index 4311cdd..a6b36b9 100644 (file)
@@ -190,6 +190,7 @@ public class XMLString {
     //
 
     /** Returns a string representation of this object. */
+    @Override
     public String toString() {
         return length > 0 ? new String(ch, offset, length) : "";
     } // toString():String
index 69802d0..63357ce 100644 (file)
@@ -105,6 +105,7 @@ public class XMLStringBuffer
     //
 
     /** Clears the string buffer. */
+    @Override
     public void clear() {
         offset = 0;
         length = 0;