velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r1145162 - /velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappUberspector.java
Date Mon, 11 Jul 2011 13:08:56 GMT
Author: cbrisson
Date: Mon Jul 11 13:08:56 2011
New Revision: 1145162

URL: http://svn.apache.org/viewvc?rev=1145162&view=rev
Log:
remove useless try/catch blocks now that engine-2.x is used

Modified:
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappUberspector.java

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappUberspector.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappUberspector.java?rev=1145162&r1=1145161&r2=1145162&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappUberspector.java
(original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappUberspector.java
Mon Jul 11 13:08:56 2011
@@ -66,16 +66,8 @@ public class WebappUberspector extends A
      */
     public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
     {
-        // this try-catch is here to allow compilation under velocity-engine-1.x & velocity-engine-2.x
-        VelPropertyGet ret;
-        try
-        {
-            ret = super.getPropertyGet(obj,identifier,i);
-        }
-        catch(Exception e)
-        {
-            throw new RuntimeException(e);
-        }
+        VelPropertyGet ret = super.getPropertyGet(obj,identifier,i);
+
         if(ret == null)
         {
             Class claz = obj.getClass();
@@ -96,18 +88,7 @@ public class WebappUberspector extends A
     @Override
     public void init()
     {
-        try
-        {
-            super.init();
-        }
-        catch (RuntimeException re)
-        {
-            throw re;
-        }
-        catch (Exception e)
-        {
-            throw new RuntimeException(e);
-        }
+        super.init();
 
         // we need our own introspector since the inner one is hidden by the Uberspect interface
         introspector = new Introspector(log);
@@ -125,16 +106,8 @@ public class WebappUberspector extends A
     public VelPropertySet getPropertySet(Object obj, String identifier,
                                          Object arg, Info i)
     {
-        // this try-catch is here to allow compilation under velocity-engine-1.x & velocity-engine-2.x
-        VelPropertySet ret;
-        try
-        {
-           ret = super.getPropertySet(obj,identifier,arg,i);
-        }
-        catch(Exception e)
-        {
-            throw new RuntimeException(e);
-        }
+        VelPropertySet ret = super.getPropertySet(obj,identifier,arg,i);
+
         if(ret == null) {
             Class claz = obj.getClass();
             if(obj instanceof HttpServletRequest



Mime
View raw message