openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r1476595 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: intercept/InterceptorResolutionService.java util/ClassUtil.java
Date Sat, 27 Apr 2013 14:45:45 GMT
Author: gpetracek
Date: Sat Apr 27 14:45:45 2013
New Revision: 1476595

URL: http://svn.apache.org/r1476595
Log:
OWB-828 improved handling of bridge methods

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

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java?rev=1476595&r1=1476594&r2=1476595&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java
Sat Apr 27 14:45:45 2013
@@ -558,6 +558,12 @@ public class InterceptorResolutionServic
         Set<AnnotatedMethod> annotatedMethods = annotatedType.getMethods();
         for (Method interceptableMethod : interceptableMethods)
         {
+            //don't proxy bridge methods - see OWB-828
+            if (interceptableMethod.isBridge())
+            {
+                continue;
+            }
+
             for (AnnotatedMethod<?> annotatedMethod : annotatedMethods)
             {
                 if (annotatedMethod.getJavaMember().equals(interceptableMethod))

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=1476595&r1=1476594&r2=1476595&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
Sat Apr 27 14:45:45 2013
@@ -1061,13 +1061,6 @@ public final class ClassUtil
      */
     public static boolean isOverridden(Method subClassMethod, Method superClassMethod)
     {
-        //in this case it's a different method or a bridge-method - check esp. needed for
OWB-828
-        if (!subClassMethod.getReturnType().equals(subClassMethod.getReturnType()) ||
-                !superClassMethod.getGenericReturnType().equals(subClassMethod.getGenericReturnType()))
-        {
-            return false;
-        }
-
         if (isSuperClass(superClassMethod.getDeclaringClass(), subClassMethod.getDeclaringClass())
                 && subClassMethod.getName().equals(superClassMethod.getName())
                 && Arrays.equals(subClassMethod.getParameterTypes(), superClassMethod.getParameterTypes()))



Mime
View raw message