diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-06-02 00:43:22 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-06-02 00:43:22 +0200 |
commit | 95a19c114afa9f19ad3fae902efab7eecb724ae0 (patch) | |
tree | be75b886c47655bc606ecfe2e9bf4ae8b3219e09 /src | |
parent | 9fa8b60b4dccfbe890814fba77d2f31652409389 (diff) | |
download | kvision-95a19c114afa9f19ad3fae902efab7eecb724ae0.tar.gz kvision-95a19c114afa9f19ad3fae902efab7eecb724ae0.tar.bz2 kvision-95a19c114afa9f19ad3fae902efab7eecb724ae0.zip |
Style fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt b/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt index 9101539f..0b2bba23 100644 --- a/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt +++ b/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt @@ -41,7 +41,7 @@ actual open class ServiceManager<out T> actual constructor(service: T) { noinline function: T.(Request?) -> Deferred<RET>, route: String?, method: RpcHttpMethod, prefix: String ) { - val routeDef = if (route != null) route else "route${this::class.simpleName}${counter++}" + val routeDef = route ?: "route${this::class.simpleName}${counter++}" calls[function.toString()] = Pair("$prefix$routeDef", method) } @@ -56,7 +56,7 @@ actual open class ServiceManager<out T> actual constructor(service: T) { noinline function: T.(PAR, Request?) -> Deferred<RET>, route: String?, method: RpcHttpMethod, prefix: String ) { - val routeDef = if (route != null) route else "route${this::class.simpleName}${counter++}" + val routeDef = route ?: "route${this::class.simpleName}${counter++}" calls[function.toString()] = Pair("$prefix$routeDef", method) } @@ -71,7 +71,7 @@ actual open class ServiceManager<out T> actual constructor(service: T) { noinline function: T.(PAR1, PAR2, Request?) -> Deferred<RET>, route: String?, method: RpcHttpMethod, prefix: String ) { - val routeDef = if (route != null) route else "route${this::class.simpleName}${counter++}" + val routeDef = route ?: "route${this::class.simpleName}${counter++}" calls[function.toString()] = Pair("$prefix$routeDef", method) } @@ -86,7 +86,7 @@ actual open class ServiceManager<out T> actual constructor(service: T) { noinline function: T.(PAR1, PAR2, PAR3, Request?) -> Deferred<RET>, route: String?, method: RpcHttpMethod, prefix: String ) { - val routeDef = if (route != null) route else "route${this::class.simpleName}${counter++}" + val routeDef = route ?: "route${this::class.simpleName}${counter++}" calls[function.toString()] = Pair("$prefix$routeDef", method) } @@ -101,7 +101,7 @@ actual open class ServiceManager<out T> actual constructor(service: T) { noinline function: T.(PAR1, PAR2, PAR3, PAR4, Request?) -> Deferred<RET>, route: String?, method: RpcHttpMethod, prefix: String ) { - val routeDef = if (route != null) route else "route${this::class.simpleName}${counter++}" + val routeDef = route ?: "route${this::class.simpleName}${counter++}" calls[function.toString()] = Pair("$prefix$routeDef", method) } @@ -119,7 +119,7 @@ actual open class ServiceManager<out T> actual constructor(service: T) { method: RpcHttpMethod, prefix: String ) { - val routeDef = if (route != null) route else "route${this::class.simpleName}${counter++}" + val routeDef = route ?: "route${this::class.simpleName}${counter++}" calls[function.toString()] = Pair("$prefix$routeDef", method) } |