mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +00:00
Another simple code review tweak.
This commit is contained in:
parent
34797c2735
commit
ec9ecc88cc
@ -14,7 +14,6 @@ import net.corda.client.model.Models
|
|||||||
import net.corda.client.model.observableValue
|
import net.corda.client.model.observableValue
|
||||||
import net.corda.core.contracts.GBP
|
import net.corda.core.contracts.GBP
|
||||||
import net.corda.core.contracts.USD
|
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.ServiceInfo
|
||||||
import net.corda.core.node.services.ServiceType
|
import net.corda.core.node.services.ServiceType
|
||||||
import net.corda.explorer.model.CordaViewModel
|
import net.corda.explorer.model.CordaViewModel
|
||||||
@ -89,12 +88,8 @@ class Main : App(MainView::class) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun asInteger(s: String?): Int? {
|
private fun asInteger(s: String?): Int? {
|
||||||
if (s == null) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return s.toInt()
|
return s?.toInt()
|
||||||
} catch (e: NumberFormatException) {
|
} catch (e: NumberFormatException) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user