From ec9ecc88cc8727ccdd0e46b7b7ff65af6e808fde Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Thu, 23 Feb 2017 18:15:58 +0000 Subject: [PATCH] Another simple code review tweak. --- tools/explorer/src/main/kotlin/net/corda/explorer/Main.kt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/explorer/src/main/kotlin/net/corda/explorer/Main.kt b/tools/explorer/src/main/kotlin/net/corda/explorer/Main.kt index c144b6d768..60931962ee 100644 --- a/tools/explorer/src/main/kotlin/net/corda/explorer/Main.kt +++ b/tools/explorer/src/main/kotlin/net/corda/explorer/Main.kt @@ -14,7 +14,6 @@ import net.corda.client.model.Models import net.corda.client.model.observableValue import net.corda.core.contracts.GBP import net.corda.core.contracts.USD -import net.corda.core.messaging.startFlow import net.corda.core.node.services.ServiceInfo import net.corda.core.node.services.ServiceType import net.corda.explorer.model.CordaViewModel @@ -89,12 +88,8 @@ class Main : App(MainView::class) { } private fun asInteger(s: String?): Int? { - if (s == null) { - return null - } - try { - return s.toInt() + return s?.toInt() } catch (e: NumberFormatException) { return null }