Fixing bug in ClassHierarchy.getLeastCommonSuperclass

If C1 extends C2 extends C3 getLeastCommonSuperClass(C1,C2) would give C3 instead of C2
This commit is contained in:
Andrew Johnson 2014-05-21 23:28:11 -04:00
parent b29bc2dac0
commit c3202533f7
1 changed files with 1 additions and 1 deletions

View File

@ -769,7 +769,7 @@ public class ClassHierarchy implements IClassHierarchy {
}
IClass aa = a;
while (aa != null) {
if (superB.contains(aa)) {
if (b.equals(aa) || superB.contains(aa)) {
return aa;
}
aa = aa.getSuperclass();