openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1130394 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util: ClassUtil.java WebBeansUtil.java
Date Thu, 02 Jun 2011 03:15:36 GMT
Author: djencks
Date: Thu Jun  2 03:15:36 2011
New Revision: 1130394

URL: http://svn.apache.org/viewvc?rev=1130394&view=rev
Log:
OWB-579 ignore synthetic final methods when checking for proxyiability.  Also mention final
method names

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java?rev=1130394&r1=1130393&r2=1130394&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
Thu Jun  2 03:15:36 2011
@@ -157,7 +157,7 @@ public final class ClassUtil
     {
         Asserts.nullCheckForModifier(modifier);
 
-        return Modifier.isFinal(modifier);
+        return Modifier.isFinal(modifier)  && ((modifier & 4096) == 0);
     }
 
     /**

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=1130394&r1=1130393&r2=1130394&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Thu Jun  2 03:15:36 2011
@@ -1831,9 +1831,13 @@ public final class WebBeansUtil
                         {
                             violationMessage.addLine(beanClass.getName(), " is a final class!
CDI doesn't allow that.");
                         }
-                        if (ClassUtil.hasFinalMethod(beanClass))
+                        Method[] methods = SecurityUtil.doPrivilegedGetDeclaredMethods(beanClass);
+                        for (Method m : methods)
                         {
-                            violationMessage.addLine(beanClass.getName(), " has final methods!
CDI doesn't allow that.");
+                            if (ClassUtil.isFinal(m.getModifiers()))
+                            {
+                                violationMessage.addLine(beanClass.getName(), " has final
method "+ m + " CDI doesn't allow that.");
+                            }
                         }
                         if (cons == null)
                         {



Mime
View raw message