openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mprud...@apache.org
Subject svn commit: r505166 - /incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/MethodLifecycleCallbacks.java
Date Fri, 09 Feb 2007 04:05:21 GMT
Author: mprudhom
Date: Thu Feb  8 20:05:20 2007
New Revision: 505166

URL: http://svn.apache.org/viewvc?view=rev&rev=505166
Log:
Corrected issue with revision 505052 to ensure that isAssignable(from, to) passes if one element
is null and the other element is an empty array (which indicates a compatible method signature).

Modified:
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/MethodLifecycleCallbacks.java

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/MethodLifecycleCallbacks.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/MethodLifecycleCallbacks.java?view=diff&rev=505166&r1=505165&r2=505166
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/MethodLifecycleCallbacks.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/MethodLifecycleCallbacks.java
Thu Feb  8 20:05:20 2007
@@ -118,8 +118,10 @@
      * from the corresponding parameters of the to array. 
      */
     private static boolean isAssignable(Class[] from, Class[] to) {
-        if (from == null || to == null)
-            return to == from;
+        if (from == null)
+            return to == null || to.length == 0;
+        if (to == null)
+            return from == null || from.length == 0;
 
         if (from.length != to.length)
             return false;



Mime
View raw message