mirror of https://github.com/apache/openjpa.git
fix inheritance issue again with interfaces
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@439554 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fc9b67f556
commit
2b66092a80
|
@ -77,6 +77,8 @@ public class InheritanceComparator
|
|||
* 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;
|
||||
|
|
|
@ -27,9 +27,6 @@ public class MetaDataInheritanceComparator
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue