From 283445f173e7588cecf353efa7a0ff6bc8fcebd5 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Fri, 25 May 2018 19:24:58 +0200 Subject: Style fixes --- src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt | 4 +++- src/main/kotlin/pl/treksoft/kvision/remote/Security.kt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/kotlin/pl/treksoft/kvision') 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(val serviceManager: ServiceManager) { /** * Executes defined call to a remote web service. */ - inline fun call(noinline function: T.(Request?) -> Deferred>): Deferred> { + inline fun call( + noinline function: T.(Request?) -> Deferred> + ): Deferred> { 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 withAuth(block: suspend () -> T): T { return try { block().also { -- cgit