mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
NPE fix.
This commit is contained in:
parent
d32a84256c
commit
fa2ef81e2c
1 changed files with 8 additions and 2 deletions
|
@ -6,6 +6,7 @@ import com.beust.kobalt.TaskResult
|
||||||
import com.beust.kobalt.misc.NamedThreadFactory
|
import com.beust.kobalt.misc.NamedThreadFactory
|
||||||
import com.beust.kobalt.misc.error
|
import com.beust.kobalt.misc.error
|
||||||
import com.beust.kobalt.misc.kobaltLog
|
import com.beust.kobalt.misc.kobaltLog
|
||||||
|
import com.beust.kobalt.misc.warn
|
||||||
import com.google.common.collect.HashMultimap
|
import com.google.common.collect.HashMultimap
|
||||||
import java.lang.reflect.InvocationTargetException
|
import java.lang.reflect.InvocationTargetException
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
@ -351,8 +352,13 @@ class DynamicGraphExecutor<T>(val graph : DynamicGraph<T>, val factory: IThreadW
|
||||||
if (line.start) {
|
if (line.start) {
|
||||||
projectStart[line.name] = line.timestamp
|
projectStart[line.name] = line.timestamp
|
||||||
} else {
|
} else {
|
||||||
duration = " (" + ((line.timestamp - projectStart[line.name]!!) / 1000)
|
val projectStart = projectStart[line.name]
|
||||||
.toInt().toString() + ")"
|
if (projectStart != null) {
|
||||||
|
duration = " (" + ((line.timestamp - projectStart) / 1000)
|
||||||
|
.toInt().toString() + ")"
|
||||||
|
} else {
|
||||||
|
warn("Couldn't determine project start: " + line.name)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
row.add((line.name + duration))
|
row.add((line.name + duration))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue