aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-05-25 19:24:58 +0200
committerRobert Jaros <rjaros@finn.pl>2018-05-25 19:24:58 +0200
commit283445f173e7588cecf353efa7a0ff6bc8fcebd5 (patch)
tree6ed6504d7de80c6646c4f1892614f76c9070eb3e /src
parentc60488c51b2335a3848290e4a8e50b325b18ff5d (diff)
downloadkvision-283445f173e7588cecf353efa7a0ff6bc8fcebd5.tar.gz
kvision-283445f173e7588cecf353efa7a0ff6bc8fcebd5.tar.bz2
kvision-283445f173e7588cecf353efa7a0ff6bc8fcebd5.zip
Style fixes
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt4
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/remote/Security.kt1
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 {