1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

NPE with no args.

This commit is contained in:
Cedric Beust 2015-10-15 02:01:36 -07:00
parent 06535e3921
commit 042a3153e5

View file

@ -43,7 +43,7 @@ public class DynamicGraphExecutor<T>(val graph: DynamicGraph<T>,
* @return 0 if all went well, > 0 otherwise * @return 0 if all went well, > 0 otherwise
*/ */
public fun run() : Int { public fun run() : Int {
var lastResult : TaskResult? = null var lastResult = TaskResult()
while (graph.freeNodes.size() > 0) { while (graph.freeNodes.size() > 0) {
log(3, "Current count: ${graph.nodeCount}") log(3, "Current count: ${graph.nodeCount}")
synchronized(graph) { synchronized(graph) {
@ -75,7 +75,7 @@ public class DynamicGraphExecutor<T>(val graph: DynamicGraph<T>,
} }
} }
executor.shutdown() executor.shutdown()
return if (lastResult?.success!!) 0 else 1 return if (lastResult.success) 0 else 1
} }
} }