tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1465807 - in /tomcat/trunk/java/org/apache/jasper/compiler: ErrorDispatcher.java Generator.java JspDocumentParser.java TagLibraryInfoImpl.java
Date Mon, 08 Apr 2013 22:09:13 GMT
Author: kkolinko
Date: Mon Apr  8 22:09:12 2013
New Revision: 1465807

URL: http://svn.apache.org/r1465807
Log:
Change order of arguments in preparation for a better API (I mean varargs).

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java
    tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
    tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
    tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java?rev=1465807&r1=1465806&r2=1465807&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java Mon Apr  8 22:09:12
2013
@@ -277,11 +277,20 @@ public class ErrorDispatcher {
      * @param arg Argument for parametric replacement
      * @param e Parsing exception
      */
-    public void jspError(String errCode, String arg, Exception e)
+    public void jspError(Exception e, String errCode, String arg)
                 throws JasperException {
         dispatch(null, errCode, new Object[] {arg}, e);
     }
 
+    /**
+     * @deprecated Replaced by jspError(Exception, String, String)
+     */
+    @Deprecated
+    public void jspError(String errCode, String arg, Exception e)
+            throws JasperException {
+        jspError(e, errCode, arg);
+    }
+
     /*
      * Dispatches the given JSP parse error to the configured error handler.
      *
@@ -294,12 +303,21 @@ public class ErrorDispatcher {
      * @param arg Argument for parametric replacement
      * @param e Parsing exception
      */
-    public void jspError(Node n, String errCode, String arg, Exception e)
+    public void jspError(Node n, Exception e, String errCode, String arg)
                 throws JasperException {
         dispatch(n.getStart(), errCode, new Object[] {arg}, e);
     }
 
     /**
+     * @deprecated Replaced by jspError(Node, Exception, String, String)
+     */
+    @Deprecated
+    public void jspError(Node n, String errCode, String arg, Exception e)
+            throws JasperException {
+        jspError(n, e, errCode, arg);
+    }
+
+    /**
      * Parses the given error message into an array of javac compilation error
      * messages (one per javac compilation error line number).
      *

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Generator.java?rev=1465807&r1=1465806&r2=1465807&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Generator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Generator.java Mon Apr  8 22:09:12 2013
@@ -3968,8 +3968,8 @@ class Generator {
                                 .getPropertyEditorClass());
                 }
             } catch (IntrospectionException ie) {
-                err.jspError(n, "jsp.error.introspect.taghandler",
-                        tagHandlerClass.getName(), ie);
+                err.jspError(n, ie, "jsp.error.introspect.taghandler",
+                        tagHandlerClass.getName());
             }
         }
 

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java?rev=1465807&r1=1465806&r2=1465807&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java Mon Apr  8 22:09:12
2013
@@ -200,7 +200,7 @@ class JspDocumentParser
             pageNodes = new Node.Nodes(dummyRoot);
 
         } catch (IOException ioe) {
-            jspDocParser.err.jspError("jsp.error.data.file.read", path, ioe);
+            jspDocParser.err.jspError(ioe, "jsp.error.data.file.read", path);
         } catch (SAXParseException e) {
             jspDocParser.err.jspError
                 (new Mark(jspDocParser.ctxt, path, e.getLineNumber(),

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java?rev=1465807&r1=1465806&r2=1465807&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Mon Apr  8 22:09:12
2013
@@ -411,8 +411,8 @@ class TagLibraryInfoImpl extends TagLibr
                     ctxt.getClassLoader().loadClass(teiClassName);
                 tei = (TagExtraInfo) teiClass.newInstance();
             } catch (Exception e) {
-                err.jspError("jsp.error.teiclass.instantiation", teiClassName,
-                        e);
+                err.jspError(e, "jsp.error.teiclass.instantiation",
+                        teiClassName);
             }
         }
 
@@ -663,8 +663,8 @@ class TagLibraryInfoImpl extends TagLibr
                         .loadClass(validatorClass);
                 tlv = (TagLibraryValidator) tlvClass.newInstance();
             } catch (Exception e) {
-                err.jspError("jsp.error.tlvclass.instantiation",
-                        validatorClass, e);
+                err.jspError(e, "jsp.error.tlvclass.instantiation",
+                        validatorClass);
             }
         }
         if (tlv != null) {



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


Mime
View raw message