konsoletyper 2014-11-03 20:31:49 +03:00
parent e934ddc798
commit 9be6ce9bbf
2 changed files with 8 additions and 2 deletions

View File

@ -225,7 +225,7 @@ public class DependencyChecker implements DependencyInfo, DependencyAgent {
if (dependency.isMissing()) { if (dependency.isMissing()) {
missingClasses.add(dependency); missingClasses.add(dependency);
} else { } else {
if (cls.getParent() != null) { if (cls.getParent() != null && !cls.getParent().equals(className)) {
linkClass(cls.getParent(), stack); linkClass(cls.getParent(), stack);
} }
for (String ifaceName : cls.getInterfaces()) { for (String ifaceName : cls.getInterfaces()) {
@ -267,7 +267,7 @@ public class DependencyChecker implements DependencyInfo, DependencyAgent {
if (reader != null) { if (reader != null) {
return reader; return reader;
} }
if (cls.getParent() != null) { if (cls.getParent() != null && cls.getParent().equals(cls.getParent())) {
reader = methodReaderCache.map(new MethodReference(cls.getParent(), desc)); reader = methodReaderCache.map(new MethodReference(cls.getParent(), desc));
if (reader != null) { if (reader != null) {
return reader; return reader;
@ -294,6 +294,9 @@ public class DependencyChecker implements DependencyInfo, DependencyAgent {
if (field != null) { if (field != null) {
return field; return field;
} }
if (clsName.equals(cls.getParent())) {
break;
}
clsName = cls.getParent(); clsName = cls.getParent();
} }
return null; return null;

View File

@ -55,6 +55,9 @@ public final class Parser {
if (node.superName != null) { if (node.superName != null) {
cls.setParent(node.superName.replace('/', '.')); cls.setParent(node.superName.replace('/', '.'));
} }
if (cls.getName().equals("java.lang.Object")) {
cls.setParent(null);
}
if (node.interfaces != null) { if (node.interfaces != null) {
for (Object obj : node.interfaces) { for (Object obj : node.interfaces) {
cls.getInterfaces().add(((String)obj).replace('/', '.')); cls.getInterfaces().add(((String)obj).replace('/', '.'));