You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by nb...@apache.org on 2009/05/13 17:54:08 UTC

svn commit: r774412 - in /velocity/engine/trunk/src: java/org/apache/velocity/util/introspection/ test/org/apache/velocity/test/misc/ test/org/apache/velocity/test/util/introspection/

Author: nbubna
Date: Wed May 13 15:54:07 2009
New Revision: 774412

URL: http://svn.apache.org/viewvc?rev=774412&view=rev
Log:
VELOCITY-659 revert changes to Uberspect plugin API (fixes gump's complaints)

Modified:
    velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java
    velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/LinkingUberspector.java
    velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/SecureUberspector.java
    velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java
    velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java
    velocity/engine/trunk/src/test/org/apache/velocity/test/misc/UberspectTestImpl.java
    velocity/engine/trunk/src/test/org/apache/velocity/test/util/introspection/ChainedUberspectorsTestCase.java

Modified: velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java?rev=774412&r1=774411&r2=774412&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java Wed May 13 15:54:07 2009
@@ -66,7 +66,7 @@
      */
     //@SuppressWarnings("unchecked")
     //@Override
-    public Iterator getIterator(Object obj, Info i)
+    public Iterator getIterator(Object obj, Info i) throws Exception
     {
         return (this.inner != null) ? this.inner.getIterator(obj, i) : null;
     }
@@ -79,6 +79,7 @@
      */
     //@Override
     public VelMethod getMethod(Object obj, String methodName, Object[] args, Info i)
+        throws Exception
     {
         return (this.inner != null) ? this.inner.getMethod(obj, methodName, args, i) : null;
     }
@@ -91,6 +92,7 @@
      */
     //@Override
     public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
+        throws Exception
     {
         return (this.inner != null) ? this.inner.getPropertyGet(obj, identifier, i) : null;
     }
@@ -103,6 +105,7 @@
      */
     //@Override
     public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info i)
+        throws Exception
     {
         return (this.inner != null) ? this.inner.getPropertySet(obj, identifier, arg, i) : null;
     }

Modified: velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/LinkingUberspector.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/LinkingUberspector.java?rev=774412&r1=774411&r2=774412&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/LinkingUberspector.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/LinkingUberspector.java Wed May 13 15:54:07 2009
@@ -73,7 +73,7 @@
      */
     //@SuppressWarnings("unchecked")
     //@Override
-    public Iterator getIterator(Object obj, Info i)
+    public Iterator getIterator(Object obj, Info i) throws Exception
     {
         Iterator it = leftUberspect.getIterator(obj,i);
         return it != null ? it : rightUberspect.getIterator(obj,i);
@@ -87,6 +87,7 @@
      */
     //@Override
     public VelMethod getMethod(Object obj, String methodName, Object[] args, Info i)
+        throws Exception
     {
         VelMethod method = leftUberspect.getMethod(obj,methodName,args,i);
         return method != null ? method : rightUberspect.getMethod(obj,methodName,args,i);
@@ -100,6 +101,7 @@
      */
     //@Override
     public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
+        throws Exception
     {
         VelPropertyGet getter = leftUberspect.getPropertyGet(obj,identifier,i);
         return getter != null ? getter : rightUberspect.getPropertyGet(obj,identifier,i);
@@ -113,6 +115,7 @@
      */
     //@Override
     public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info i)
+        throws Exception
     {
         VelPropertySet setter = leftUberspect.getPropertySet(obj,identifier,arg,i);
         return setter != null ? setter : rightUberspect.getPropertySet(obj,identifier,arg,i);

Modified: velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/SecureUberspector.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/SecureUberspector.java?rev=774412&r1=774411&r2=774412&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/SecureUberspector.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/SecureUberspector.java Wed May 13 15:54:07 2009
@@ -73,7 +73,7 @@
      * @param i line, column, template info
      * @return Iterator for object
      */
-    public Iterator getIterator(Object obj, Info i)
+    public Iterator getIterator(Object obj, Info i) throws Exception
     {
         if (obj != null)
         {

Modified: velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java?rev=774412&r1=774411&r2=774412&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java Wed May 13 15:54:07 2009
@@ -41,7 +41,7 @@
      * @param info
      * @return An Iterator.
      */
-    public Iterator getIterator(Object obj, Info info);
+    public Iterator getIterator(Object obj, Info info) throws Exception;
 
     /**
      *  Returns a general method, corresponding to $foo.bar( $woogie )
@@ -51,7 +51,7 @@
      * @param info
      * @return A Velocity Method.
      */
-    public VelMethod getMethod(Object obj, String method, Object[] args, Info info);
+    public VelMethod getMethod(Object obj, String method, Object[] args, Info info) throws Exception;
 
     /**
      * Property getter - returns VelPropertyGet appropos for #set($foo = $bar.woogie)
@@ -60,7 +60,7 @@
      * @param info
      * @return A Velocity Getter.
      */
-    public VelPropertyGet getPropertyGet(Object obj, String identifier, Info info);
+    public VelPropertyGet getPropertyGet(Object obj, String identifier, Info info) throws Exception;
 
     /**
      * Property setter - returns VelPropertySet appropos for #set($foo.bar = "geir")
@@ -70,5 +70,5 @@
      * @param info
      * @return A Velocity Setter.
      */
-    public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info info);
+    public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info info) throws Exception;
 }

Modified: velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java?rev=774412&r1=774411&r2=774412&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java Wed May 13 15:54:07 2009
@@ -106,6 +106,7 @@
      * @return An {@link Iterator} object.
      */
     public Iterator getIterator(Object obj, Info i)
+        throws Exception
     {
         if (obj.getClass().isArray())
         {
@@ -190,6 +191,7 @@
      * @return A Velocity Method.
      */
     public VelMethod getMethod(Object obj, String methodName, Object[] args, Info i)
+        throws Exception
     {
         if (obj == null)
         {
@@ -236,6 +238,7 @@
      * @throws Exception
      */
     public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
+        throws Exception
     {
         if (obj == null)
         {
@@ -290,7 +293,7 @@
      * @throws Exception
      */
     public VelPropertySet getPropertySet(Object obj, String identifier,
-                                         Object arg, Info i)
+                                         Object arg, Info i) throws Exception
     {
         if (obj == null)
         {

Modified: velocity/engine/trunk/src/test/org/apache/velocity/test/misc/UberspectTestImpl.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/misc/UberspectTestImpl.java?rev=774412&r1=774411&r2=774412&view=diff
==============================================================================
--- velocity/engine/trunk/src/test/org/apache/velocity/test/misc/UberspectTestImpl.java (original)
+++ velocity/engine/trunk/src/test/org/apache/velocity/test/misc/UberspectTestImpl.java Wed May 13 15:54:07 2009
@@ -32,6 +32,7 @@
 {
 
     public VelMethod getMethod(Object obj, String methodName, Object[] args, Info i)
+        throws Exception
     {
         VelMethod method = super.getMethod(obj, methodName, args, i);
 
@@ -47,6 +48,7 @@
     }
 
     public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
+        throws Exception
     {
         VelPropertyGet propertyGet = super.getPropertyGet(obj, identifier, i);
 

Modified: velocity/engine/trunk/src/test/org/apache/velocity/test/util/introspection/ChainedUberspectorsTestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/util/introspection/ChainedUberspectorsTestCase.java?rev=774412&r1=774411&r2=774412&view=diff
==============================================================================
--- velocity/engine/trunk/src/test/org/apache/velocity/test/util/introspection/ChainedUberspectorsTestCase.java (original)
+++ velocity/engine/trunk/src/test/org/apache/velocity/test/util/introspection/ChainedUberspectorsTestCase.java Wed May 13 15:54:07 2009
@@ -84,6 +84,7 @@
     public static class ChainedUberspector extends AbstractChainableUberspector
     {
         public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info info)
+            throws Exception
         {
             identifier = identifier.replaceAll("foo","bar");
             return inner.getPropertySet(obj,identifier,arg,info);
@@ -94,6 +95,7 @@
     public static class LinkedUberspector extends UberspectImpl
     {
         public VelPropertyGet getPropertyGet(Object obj, String identifier, Info info)
+            throws Exception
         {
             identifier = identifier.replaceAll("foo","bar");
             return super.getPropertyGet(obj,identifier,info);