From 042a3153e5a39163ed4c94b78d2d1aeea069875f Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Thu, 15 Oct 2015 02:01:36 -0700 Subject: [PATCH] NPE with no args. --- src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt b/src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt index b1940076..23d099e1 100644 --- a/src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt +++ b/src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt @@ -43,7 +43,7 @@ public class DynamicGraphExecutor(val graph: DynamicGraph, * @return 0 if all went well, > 0 otherwise */ public fun run() : Int { - var lastResult : TaskResult? = null + var lastResult = TaskResult() while (graph.freeNodes.size() > 0) { log(3, "Current count: ${graph.nodeCount}") synchronized(graph) { @@ -75,7 +75,7 @@ public class DynamicGraphExecutor(val graph: DynamicGraph, } } executor.shutdown() - return if (lastResult?.success!!) 0 else 1 + return if (lastResult.success) 0 else 1 } }