aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From timothyjw...@apache.org
Subject svn commit: r1239503 - /aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/gen/ProxySubclassGenerator.java
Date Thu, 02 Feb 2012 09:29:02 GMT
Author: timothyjward
Date: Thu Feb  2 09:29:01 2012
New Revision: 1239503

URL: http://svn.apache.org/viewvc?rev=1239503&view=rev
Log:
ARIES-743: Avoid spuriously failing when the proxy subclasser finds a static final method

Modified:
    aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/gen/ProxySubclassGenerator.java

Modified: aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/gen/ProxySubclassGenerator.java
URL: http://svn.apache.org/viewvc/aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/gen/ProxySubclassGenerator.java?rev=1239503&r1=1239502&r2=1239503&view=diff
==============================================================================
--- aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/gen/ProxySubclassGenerator.java
(original)
+++ aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/gen/ProxySubclassGenerator.java
Thu Feb  2 09:29:01 2012
@@ -25,6 +25,7 @@ import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
 import java.security.ProtectionDomain;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -311,7 +312,8 @@ public class ProxySubclassGenerator
     // java.lang.Object first)
     while (!clazz.getName().startsWith("java.") && !clazz.getName().startsWith("javax."))
{
       for (Method m : clazz.getDeclaredMethods()) {
-        if (isFinal(m.getModifiers())) {
+        //Static finals are ok, because we won't be overriding them :)
+        if (isFinal(m.getModifiers()) && !Modifier.isStatic(m.getModifiers())) {
           finalMethods.add(m.toGenericString());
         }
       }



Mime
View raw message