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:
Stephen Kim 2006-09-02 07:27:13 +00:00
parent fc9b67f556
commit 2b66092a80
2 changed files with 3 additions and 4 deletions

View File

@ -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;

View File

@ -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();
}
}