openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r1470870 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
Date Tue, 23 Apr 2013 10:00:48 GMT
Author: gpetracek
Date: Tue Apr 23 10:00:48 2013
New Revision: 1470870

URL: http://svn.apache.org/r1470870
Log:
OWB-828 additional check needed for bridge-methods

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.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=1470870&r1=1470869&r2=1470870&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
Tue Apr 23 10:00:48 2013
@@ -1061,6 +1061,13 @@ 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