Fix exception thrown with incomplete classpath

This commit is contained in:
konsoletyper 2015-03-12 20:24:33 +03:00
parent 3a29e869ef
commit 14dd352cb6
2 changed files with 4 additions and 1 deletions

View File

@ -120,7 +120,7 @@ public class Decompiler {
} }
ClassHolder cls = classSource.get(className); ClassHolder cls = classSource.get(className);
if (cls == null) { if (cls == null) {
throw new IllegalArgumentException("Class not found: " + className); return;
} }
if (cls.getParent() != null) { if (cls.getParent() != null) {
orderClasses(cls.getParent(), visited, order); orderClasses(cls.getParent(), visited, order);

View File

@ -74,6 +74,9 @@ class JSODependencyListener implements DependencyListener {
private ExposedClass createExposedClass(String name) { private ExposedClass createExposedClass(String name) {
ClassReader cls = classSource.get(name); ClassReader cls = classSource.get(name);
ExposedClass exposedCls = new ExposedClass(); ExposedClass exposedCls = new ExposedClass();
if (cls == null) {
return exposedCls;
}
if (cls.getParent() != null && !cls.getParent().equals(cls.getName())) { if (cls.getParent() != null && !cls.getParent().equals(cls.getName())) {
ExposedClass parent = getExposedClass(cls.getParent()); ExposedClass parent = getExposedClass(cls.getParent());
exposedCls.inheritedMethods.putAll(parent.inheritedMethods); exposedCls.inheritedMethods.putAll(parent.inheritedMethods);