diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-05-25 19:24:58 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-05-25 19:24:58 +0200 |
commit | 283445f173e7588cecf353efa7a0ff6bc8fcebd5 (patch) | |
tree | 6ed6504d7de80c6646c4f1892614f76c9070eb3e | |
parent | c60488c51b2335a3848290e4a8e50b325b18ff5d (diff) | |
download | kvision-283445f173e7588cecf353efa7a0ff6bc8fcebd5.tar.gz kvision-283445f173e7588cecf353efa7a0ff6bc8fcebd5.tar.bz2 kvision-283445f173e7588cecf353efa7a0ff6bc8fcebd5.zip |
Style fixes
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt | 4 | ||||
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/remote/Security.kt | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt b/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt index 145657df..c7103200 100644 --- a/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt +++ b/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt @@ -65,7 +65,9 @@ open class RemoteAgent<out T>(val serviceManager: ServiceManager<T>) { /** * Executes defined call to a remote web service. */ - inline fun <reified RET : Any, T> call(noinline function: T.(Request?) -> Deferred<List<RET>>): Deferred<List<RET>> { + inline fun <reified RET : Any, T> call( + noinline function: T.(Request?) -> Deferred<List<RET>> + ): Deferred<List<RET>> { val (url, method) = serviceManager.getCalls()[function.toString()] ?: throw IllegalStateException("Function not specified!") return callAgent.jsonRpcCall(url, method = method).then { diff --git a/src/main/kotlin/pl/treksoft/kvision/remote/Security.kt b/src/main/kotlin/pl/treksoft/kvision/remote/Security.kt index 4e89f558..2d4ab9eb 100644 --- a/src/main/kotlin/pl/treksoft/kvision/remote/Security.kt +++ b/src/main/kotlin/pl/treksoft/kvision/remote/Security.kt @@ -70,6 +70,7 @@ abstract class SecurityMgr { * Executes given block of code after successful authentication. * @param block a block of code */ + @Suppress("NestedBlockDepth", "TooGenericExceptionCaught") suspend fun <T> withAuth(block: suspend () -> T): T { return try { block().also { |