Merge if clauses

This commit is contained in:
Gary Gregory 2024-09-12 10:16:48 -04:00
parent 2e0e2a1659
commit 3739a4cd37
1 changed files with 2 additions and 4 deletions

View File

@ -233,12 +233,10 @@ public class MethodUtils {
while (interfaceIndex < allInterfaces.size() ||
superClassIndex < allSuperclasses.size()) {
final Class<?> acls;
if (interfaceIndex >= allInterfaces.size()) {
if (interfaceIndex >= allInterfaces.size() || superClassIndex < allSuperclasses.size() && superClassIndex < interfaceIndex) {
acls = allSuperclasses.get(superClassIndex++);
} else if (superClassIndex >= allSuperclasses.size() || !(superClassIndex < interfaceIndex)) {
acls = allInterfaces.get(interfaceIndex++);
} else {
acls = allSuperclasses.get(superClassIndex++);
acls = allInterfaces.get(interfaceIndex++);
}
allSuperClassesAndInterfaces.add(acls);
}