commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1296616 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/CommonsGraph.java
Date Sat, 03 Mar 2012 12:40:50 GMT
Author: simonetripodi
Date: Sat Mar  3 12:40:50 2012
New Revision: 1296616

URL: http://svn.apache.org/viewvc?rev=1296616&view=rev
Log:
shield bot synchronized and not invocations from InvocationTargetException

Modified:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/CommonsGraph.java

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/CommonsGraph.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/CommonsGraph.java?rev=1296616&r1=1296615&r2=1296616&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/CommonsGraph.java (original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/CommonsGraph.java Sat
Mar  3 12:40:50 2012
@@ -321,17 +321,23 @@ public final class CommonsGraph<V extend
             {
                 synchronized ( lock )
                 {
-                    try
-                    {
-                        return method.invoke( checkedToBeSynchronized, args );
-                    }
-                    catch ( InvocationTargetException e )
-                    {
-                        throw e.getTargetException();
-                    }
+                    return invoke( method, args );
                 }
             }
-            return method.invoke( checkedToBeSynchronized, args );
+            return invoke( method, args );
+        }
+
+        private Object invoke( Method method, Object[] args )
+            throws Throwable
+        {
+            try
+            {
+                return method.invoke( checkedToBeSynchronized, args );
+            }
+            catch ( InvocationTargetException e )
+            {
+                throw e.getTargetException();
+            }
         }
 
     }



Mime
View raw message