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.
|
* Count the levels of inheritance between this class and our base class.
|
||||||
*/
|
*/
|
||||||
private int levels(Class to) {
|
private int levels(Class to) {
|
||||||
|
if (to.isInterface())
|
||||||
|
return to.getInterfaces().length;
|
||||||
for (int i = 0; to != null; i++, to = to.getSuperclass())
|
for (int i = 0; to != null; i++, to = to.getSuperclass())
|
||||||
if (to == _base)
|
if (to == _base)
|
||||||
return i;
|
return i;
|
||||||
|
|
|
@ -27,9 +27,6 @@ public class MetaDataInheritanceComparator
|
||||||
protected Class toClass(Object elem) {
|
protected Class toClass(Object elem) {
|
||||||
if (elem == null)
|
if (elem == null)
|
||||||
return null;
|
return null;
|
||||||
ClassMetaData meta = (ClassMetaData) elem;
|
return ((ClassMetaData) elem).getDescribedType();
|
||||||
if (meta.getInterfaceImpl() != null)
|
|
||||||
return meta.getInterfaceImpl();
|
|
||||||
return meta.getDescribedType();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue