You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by he...@apache.org on 2005/10/09 11:58:27 UTC

svn commit: r307381 - in /jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node: ASTIdentifier.java ASTMethod.java

Author: henning
Date: Sun Oct  9 02:58:23 2005
New Revision: 307381

URL: http://svn.apache.org/viewcvs?rev=307381&view=rev
Log:
remove double call to ite.getTargetException(), remove redundant
java.lang qualifier


Modified:
    jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java
    jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java

Modified: jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java
URL: http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java?rev=307381&r1=307380&r2=307381&view=diff
==============================================================================
--- jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java (original)
+++ jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java Sun Oct  9 02:58:23 2005
@@ -161,12 +161,13 @@
              *  also, let non-Exception Throwables go...
              */
 
-            if (ite.getTargetException() instanceof java.lang.Exception)
+            Throwable t = ite.getTargetException();
+            if (t instanceof Exception)
             {
                 try
                 {
                     return EventHandlerUtil.methodException(rsvc, context, o.getClass(), vg.getMethodName(),
-                            (Exception)ite.getTargetException());
+                            (Exception) t);
                 }
                 catch(Exception e)
                 {

Modified: jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java
URL: http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java?rev=307381&r1=307380&r2=307381&view=diff
==============================================================================
--- jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java (original)
+++ jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java Sun Oct  9 02:58:23 2005
@@ -230,11 +230,12 @@
              *  let non-Exception Throwables go...
              */
 
-            if ( ite.getTargetException() instanceof java.lang.Exception)
+            Throwable t = ite.getTargetException();
+            if (t instanceof Exception)
             {
                 try
                 {
-                    return EventHandlerUtil.methodException( rsvc, context, o.getClass(), methodName, (Exception)ite.getTargetException() );
+                    return EventHandlerUtil.methodException( rsvc, context, o.getClass(), methodName, (Exception) t );
                 }
                 catch( Exception e )
                 {



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