commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcar...@apache.org
Subject svn commit: r1507553 - /commons/proper/proxy/branches/version-2.0-work/core/src/main/java/org/apache/commons/proxy2/ProxyUtils.java
Date Sat, 27 Jul 2013 02:00:36 GMT
Author: jcarman
Date: Sat Jul 27 02:00:36 2013
New Revision: 1507553

URL: http://svn.apache.org/r1507553
Log:
Avoiding parameter variable reassignment.

Modified:
    commons/proper/proxy/branches/version-2.0-work/core/src/main/java/org/apache/commons/proxy2/ProxyUtils.java

Modified: commons/proper/proxy/branches/version-2.0-work/core/src/main/java/org/apache/commons/proxy2/ProxyUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/branches/version-2.0-work/core/src/main/java/org/apache/commons/proxy2/ProxyUtils.java?rev=1507553&r1=1507552&r2=1507553&view=diff
==============================================================================
--- commons/proper/proxy/branches/version-2.0-work/core/src/main/java/org/apache/commons/proxy2/ProxyUtils.java
(original)
+++ commons/proper/proxy/branches/version-2.0-work/core/src/main/java/org/apache/commons/proxy2/ProxyUtils.java
Sat Jul 27 02:00:36 2013
@@ -116,15 +116,16 @@ public final class ProxyUtils
         return interfaces == null ? null : (Class[]) interfaces.toArray(new Class[interfaces.size()]);
     }
 
-    private static List<Class<?>> getAllInterfacesImpl(Class<?> cls, List<Class<?>>
list)
+    private static List<Class<?>> getAllInterfacesImpl(final Class<?> cls,
List<Class<?>> list)
     {
         if (cls == null)
         {
             return null;
         }
-        while (cls != null)
+        Class<?> currentClass = cls;
+        while (currentClass != null)
         {
-            Class<?>[] interfaces = cls.getInterfaces();
+            Class<?>[] interfaces = currentClass.getInterfaces();
             for (int i = 0; i < interfaces.length; i++)
             {
                 if (!list.contains(interfaces[i]))
@@ -133,7 +134,7 @@ public final class ProxyUtils
                 }
                 getAllInterfacesImpl(interfaces[i], list);
             }
-            cls = cls.getSuperclass();
+            currentClass = currentClass.getSuperclass();
         }
         return list;
     }



Mime
View raw message