From 4e7c12453c6f74e7bccf55b2db9858393be3777f Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Mon, 6 Feb 2017 15:25:28 +0000 Subject: [PATCH] More changes from review. --- tools/demobench/build.gradle | 3 +++ .../main/kotlin/net/corda/demobench/model/DBViewer.kt | 1 - .../main/kotlin/net/corda/demobench/model/Explorer.kt | 1 - .../net/corda/demobench/model/ExplorerController.kt | 10 +++------- .../net/corda/demobench/model/ServiceController.kt | 6 ++---- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/tools/demobench/build.gradle b/tools/demobench/build.gradle index fd610400a3..b463890260 100644 --- a/tools/demobench/build.gradle +++ b/tools/demobench/build.gradle @@ -60,6 +60,9 @@ dependencies { compile "org.slf4j:jul-to-slf4j:$slf4j_version" compile "ch.qos.logback:logback-classic:$logback_version" compile "com.typesafe:config:$typesafe_config_version" + + // These libraries don't exist in any Maven repository I can find. + // See: https://github.com/JetBrains/jediterm compile ':jediterm-terminal-2.5' compile ':pty4j-0.7.2' diff --git a/tools/demobench/src/main/kotlin/net/corda/demobench/model/DBViewer.kt b/tools/demobench/src/main/kotlin/net/corda/demobench/model/DBViewer.kt index cc742eb68f..fd4dd377a3 100644 --- a/tools/demobench/src/main/kotlin/net/corda/demobench/model/DBViewer.kt +++ b/tools/demobench/src/main/kotlin/net/corda/demobench/model/DBViewer.kt @@ -7,7 +7,6 @@ import org.slf4j.LoggerFactory import java.util.concurrent.Executors import kotlin.reflect.jvm.jvmName - class DBViewer : AutoCloseable { private val log = LoggerFactory.getLogger(DBViewer::class.java) diff --git a/tools/demobench/src/main/kotlin/net/corda/demobench/model/Explorer.kt b/tools/demobench/src/main/kotlin/net/corda/demobench/model/Explorer.kt index 507fc33877..60762664a7 100644 --- a/tools/demobench/src/main/kotlin/net/corda/demobench/model/Explorer.kt +++ b/tools/demobench/src/main/kotlin/net/corda/demobench/model/Explorer.kt @@ -3,7 +3,6 @@ package net.corda.demobench.model import org.slf4j.LoggerFactory import java.util.concurrent.Executors - class Explorer(val explorerController: ExplorerController) : AutoCloseable { private val log = LoggerFactory.getLogger(Explorer::class.java) diff --git a/tools/demobench/src/main/kotlin/net/corda/demobench/model/ExplorerController.kt b/tools/demobench/src/main/kotlin/net/corda/demobench/model/ExplorerController.kt index d1c1a38b41..ef113591c9 100644 --- a/tools/demobench/src/main/kotlin/net/corda/demobench/model/ExplorerController.kt +++ b/tools/demobench/src/main/kotlin/net/corda/demobench/model/ExplorerController.kt @@ -12,12 +12,8 @@ class ExplorerController : Controller() { log.info("Explorer JAR: " + explorerPath) } - internal fun execute(vararg args: String): Process { - return jvm.execute(explorerPath, *args) - } + internal fun execute(vararg args: String) = jvm.execute(explorerPath, *args) - fun explorer(): Explorer { - return Explorer(this) - } + fun explorer() = Explorer(this) -} \ No newline at end of file +} diff --git a/tools/demobench/src/main/kotlin/net/corda/demobench/model/ServiceController.kt b/tools/demobench/src/main/kotlin/net/corda/demobench/model/ServiceController.kt index 917ca7fbdc..cac8530643 100644 --- a/tools/demobench/src/main/kotlin/net/corda/demobench/model/ServiceController.kt +++ b/tools/demobench/src/main/kotlin/net/corda/demobench/model/ServiceController.kt @@ -7,10 +7,8 @@ import java.util.* class ServiceController : Controller() { - private var serviceSet : List - - val services : List - get() = serviceSet + private var serviceSet: List + val services: List get() = serviceSet init { /*