openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r439554 - in /incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta: InheritanceComparator.java MetaDataInheritanceComparator.java
Date Sat, 02 Sep 2006 07:27:14 GMT
Author: skim
Date: Sat Sep  2 00:27:13 2006
New Revision: 439554

URL: http://svn.apache.org/viewvc?rev=439554&view=rev
Log:
fix inheritance issue again with interfaces

Modified:
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InheritanceComparator.java
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataInheritanceComparator.java

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InheritanceComparator.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InheritanceComparator.java?rev=439554&r1=439553&r2=439554&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InheritanceComparator.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InheritanceComparator.java
Sat Sep  2 00:27:13 2006
@@ -77,6 +77,8 @@
      * Count the levels of inheritance between this class and our base class.
      */
     private int levels(Class to) {
+        if (to.isInterface())
+            return to.getInterfaces().length;
         for (int i = 0; to != null; i++, to = to.getSuperclass())
             if (to == _base)
                 return i;

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataInheritanceComparator.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataInheritanceComparator.java?rev=439554&r1=439553&r2=439554&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataInheritanceComparator.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataInheritanceComparator.java
Sat Sep  2 00:27:13 2006
@@ -27,9 +27,6 @@
     protected Class toClass(Object elem) {
         if (elem == null)
             return null;
-        ClassMetaData meta = (ClassMetaData) elem;
-        if (meta.getInterfaceImpl() != null)
-            return meta.getInterfaceImpl();
-        return meta.getDescribedType();
+        return ((ClassMetaData) elem).getDescribedType();
     }
 }



Mime
View raw message