mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-09 08:24:10 -08:00
Fix NPE in DependencyChecker
This commit is contained in:
parent
107b7463c6
commit
3a4aef6f5c
|
@ -210,13 +210,14 @@ public class DependencyChecker implements DependencyInfo, DependencyAgent {
|
||||||
ClassDependency dependency = new ClassDependency(this, className, stack, cls);
|
ClassDependency dependency = new ClassDependency(this, className, stack, cls);
|
||||||
if (dependency.isMissing()) {
|
if (dependency.isMissing()) {
|
||||||
missingClasses.add(dependency);
|
missingClasses.add(dependency);
|
||||||
}
|
} else {
|
||||||
if (cls.getParent() != null) {
|
if (cls.getParent() != null) {
|
||||||
linkClass(cls.getParent(), stack);
|
linkClass(cls.getParent(), stack);
|
||||||
}
|
}
|
||||||
for (String ifaceName : cls.getInterfaces()) {
|
for (String ifaceName : cls.getInterfaces()) {
|
||||||
linkClass(ifaceName, stack);
|
linkClass(ifaceName, stack);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return dependency;
|
return dependency;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class TeaVMBuilder extends IncrementalProjectBuilder {
|
||||||
while (stack != DependencyStack.ROOT) {
|
while (stack != DependencyStack.ROOT) {
|
||||||
wasPut |= putMarker(sb.toString(), stack.getLocation(), stack.getMethod());
|
wasPut |= putMarker(sb.toString(), stack.getLocation(), stack.getMethod());
|
||||||
if (stack.getMethod() != null) {
|
if (stack.getMethod() != null) {
|
||||||
sb.append(", called by ").append(getFullMethodName(stack.getMethod()));
|
sb.append(", used by ").append(getFullMethodName(stack.getMethod()));
|
||||||
}
|
}
|
||||||
stack = stack.getCause();
|
stack = stack.getCause();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user