aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2020-02-27 15:28:16 +0100
committerRobert Jaros <rjaros@finn.pl>2020-02-27 15:28:16 +0100
commite4b5290e4898858612da882d9186b2aba548a9d9 (patch)
treeb9bbd4dbba14953fd9fba011b2c7f1e629c307d9 /kvision-modules
parentbff6c721074bda50e2d5a23d8aa96bf1f939f62a (diff)
downloadkvision-e4b5290e4898858612da882d9186b2aba548a9d9.tar.gz
kvision-e4b5290e4898858612da882d9186b2aba548a9d9.tar.bz2
kvision-e4b5290e4898858612da882d9186b2aba548a9d9.zip
Remove deprecated methods.
Style fixes.
Diffstat (limited to 'kvision-modules')
-rw-r--r--kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt6
-rw-r--r--kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemote.kt6
-rw-r--r--kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemoteInput.kt4
-rw-r--r--kvision-modules/kvision-bootstrap-select/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt6
-rw-r--r--kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt9
-rw-r--r--kvision-modules/kvision-bootstrap-upload/src/main/kotlin/pl/treksoft/kvision/form/upload/Upload.kt6
-rw-r--r--kvision-modules/kvision-common-types/src/main/kotlin/pl/treksoft/kvision/types/Date.kt3
-rw-r--r--kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt3
-rw-r--r--kvision-modules/kvision-server-javalin/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt14
-rw-r--r--kvision-modules/kvision-server-javalin/src/main/kotlin/pl/treksoft/kvision/types/Date.kt3
-rw-r--r--kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt14
-rw-r--r--kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/types/Date.kt3
-rw-r--r--kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt14
-rw-r--r--kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/types/Date.kt3
-rw-r--r--kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt15
-rw-r--r--kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/types/Date.kt3
16 files changed, 30 insertions, 82 deletions
diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt
index 4f3f3f48..6d687bb9 100644
--- a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt
+++ b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt
@@ -221,12 +221,6 @@ open class DateTime(
return input.setEventListener(block)
}
- @Deprecated("Use onEvent extension function instead.", ReplaceWith("onEvent(block)", "pl.treksoft.kvision.core.onEvent"))
- override fun setEventListener(block: SnOn<Widget>.() -> Unit): Int {
- @Suppress("DEPRECATION")
- return input.setEventListener(block)
- }
-
override fun removeEventListener(id: Int): Widget {
input.removeEventListener(id)
return this
diff --git a/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemote.kt b/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemote.kt
index e2f84fff..dbd0aa70 100644
--- a/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemote.kt
+++ b/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemote.kt
@@ -191,12 +191,6 @@ open class SelectRemote<T : Any>(
return input.setEventListener(block)
}
- @Deprecated("Use onEvent extension function instead.", ReplaceWith("onEvent(block)", "pl.treksoft.kvision.core.onEvent"))
- override fun setEventListener(block: SnOn<Widget>.() -> Unit): Int {
- @Suppress("DEPRECATION")
- return input.setEventListener(block)
- }
-
override fun removeEventListener(id: Int): Widget {
input.removeEventListener(id)
return this
diff --git a/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemoteInput.kt b/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemoteInput.kt
index 96277728..6092fd93 100644
--- a/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemoteInput.kt
+++ b/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemoteInput.kt
@@ -169,9 +169,9 @@ open class SelectRemoteInput<T : Any>(
JSON.plain.stringify(JsonRpcRequest(0, url, listOf(null, it, state))),
HttpMethod.POST
).await()
- JSON.plain.parse(RemoteOption.serializer().list, initials.result as String).map {
+ JSON.plain.parse(RemoteOption.serializer().list, initials.result as String).mapNotNull {
it.text
- }.filterNotNull().joinToString(", ")
+ }.joinToString(", ")
}
val button = getElementJQuery()?.next()
button?.removeClass("bs-placeholder")
diff --git a/kvision-modules/kvision-bootstrap-select/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt b/kvision-modules/kvision-bootstrap-select/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt
index 9f66afd8..b3f5e1c1 100644
--- a/kvision-modules/kvision-bootstrap-select/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt
+++ b/kvision-modules/kvision-bootstrap-select/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt
@@ -209,12 +209,6 @@ open class Select(
return input.setEventListener(block)
}
- @Deprecated("Use onEvent extension function instead.", ReplaceWith("onEvent(block)", "pl.treksoft.kvision.core.onEvent"))
- override fun setEventListener(block: SnOn<Widget>.() -> Unit): Int {
- @Suppress("DEPRECATION")
- return input.setEventListener(block)
- }
-
override fun removeEventListener(id: Int): Widget {
input.removeEventListener(id)
return this
diff --git a/kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt b/kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt
index c8b51372..a842a37f 100644
--- a/kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt
+++ b/kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt
@@ -205,15 +205,6 @@ open class Spinner(
return input.setEventListener(block)
}
- @Deprecated(
- "Use onEvent extension function instead.",
- ReplaceWith("onEvent(block)", "pl.treksoft.kvision.core.onEvent")
- )
- override fun setEventListener(block: SnOn<Widget>.() -> Unit): Int {
- @Suppress("DEPRECATION")
- return input.setEventListener(block)
- }
-
override fun removeEventListener(id: Int): Widget {
input.removeEventListener(id)
return this
diff --git a/kvision-modules/kvision-bootstrap-upload/src/main/kotlin/pl/treksoft/kvision/form/upload/Upload.kt b/kvision-modules/kvision-bootstrap-upload/src/main/kotlin/pl/treksoft/kvision/form/upload/Upload.kt
index 3ba635fd..ce885ff3 100644
--- a/kvision-modules/kvision-bootstrap-upload/src/main/kotlin/pl/treksoft/kvision/form/upload/Upload.kt
+++ b/kvision-modules/kvision-bootstrap-upload/src/main/kotlin/pl/treksoft/kvision/form/upload/Upload.kt
@@ -232,12 +232,6 @@ open class Upload(
return input.setEventListener(block)
}
- @Deprecated("Use onEvent extension function instead.", ReplaceWith("onEvent(block)", "pl.treksoft.kvision.core.onEvent"))
- override fun setEventListener(block: SnOn<Widget>.() -> Unit): Int {
- @Suppress("DEPRECATION")
- return input.setEventListener(block)
- }
-
override fun removeEventListener(id: Int): Widget {
input.removeEventListener(id)
return this
diff --git a/kvision-modules/kvision-common-types/src/main/kotlin/pl/treksoft/kvision/types/Date.kt b/kvision-modules/kvision-common-types/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
index 785dc789..3e7152a1 100644
--- a/kvision-modules/kvision-common-types/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
+++ b/kvision-modules/kvision-common-types/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
@@ -21,9 +21,6 @@
*/
package pl.treksoft.kvision.types
-@Deprecated("Not supported in KVision 2+. Use LocalDateTime or OffsetDateTime instead.", level = DeprecationLevel.ERROR)
-expect class Date
-
expect class LocalDateTime
expect class LocalDate
diff --git a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
index bb76914c..78370a70 100644
--- a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
+++ b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
@@ -29,9 +29,6 @@ import kotlinx.serialization.internal.SerialClassDescImpl
import kotlin.js.Date
import kotlin.math.absoluteValue
-@Deprecated("Not supported in KVision 2+. Use LocalDateTime or OffsetDateTime instead.", level = DeprecationLevel.ERROR)
-actual typealias Date = Date
-
actual typealias LocalDateTime = Date
actual typealias LocalDate = Date
diff --git a/kvision-modules/kvision-server-javalin/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-javalin/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
index 5cbd3495..ffb2936b 100644
--- a/kvision-modules/kvision-server-javalin/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
+++ b/kvision-modules/kvision-server-javalin/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
@@ -144,7 +144,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
@@ -184,7 +184,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
@@ -228,7 +228,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
@@ -274,7 +274,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
@@ -321,7 +321,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
@@ -370,7 +370,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
@@ -494,7 +494,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
diff --git a/kvision-modules/kvision-server-javalin/src/main/kotlin/pl/treksoft/kvision/types/Date.kt b/kvision-modules/kvision-server-javalin/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
index 09ba6d01..61f8ba58 100644
--- a/kvision-modules/kvision-server-javalin/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
+++ b/kvision-modules/kvision-server-javalin/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
@@ -36,9 +36,6 @@ import java.time.OffsetTime
import java.time.format.DateTimeFormatter
import java.time.format.DateTimeParseException
-@Deprecated("Not supported in KVision 2+. Use LocalDateTime or OffsetDateTime instead.", level = DeprecationLevel.ERROR)
-actual typealias Date = LocalDateTime
-
actual typealias LocalDateTime = LocalDateTime
actual typealias LocalDate = LocalDate
diff --git a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
index dc1e0f65..4e44162f 100644
--- a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
+++ b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
@@ -128,7 +128,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
@@ -164,7 +164,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
@@ -204,7 +204,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
@@ -246,7 +246,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
@@ -289,7 +289,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
@@ -334,7 +334,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
@@ -448,7 +448,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
result = mapper.writeValueAsString(result)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
JsonRpcResponse(
id = jsonRpcRequest.id, error = e.message ?: "Error",
exceptionType = e.javaClass.canonicalName
diff --git a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/types/Date.kt b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
index 09ba6d01..61f8ba58 100644
--- a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
+++ b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
@@ -36,9 +36,6 @@ import java.time.OffsetTime
import java.time.format.DateTimeFormatter
import java.time.format.DateTimeParseException
-@Deprecated("Not supported in KVision 2+. Use LocalDateTime or OffsetDateTime instead.", level = DeprecationLevel.ERROR)
-actual typealias Date = LocalDateTime
-
actual typealias LocalDateTime = LocalDateTime
actual typealias LocalDate = LocalDate
diff --git a/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
index d3fde5c7..276ee9a6 100644
--- a/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
+++ b/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
@@ -128,7 +128,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
call.respond(
JsonRpcResponse(
id = jsonRpcRequest.id,
@@ -168,7 +168,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
call.respond(
JsonRpcResponse(
id = jsonRpcRequest.id,
@@ -217,7 +217,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
call.respond(
JsonRpcResponse(
id = jsonRpcRequest.id,
@@ -268,7 +268,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
call.respond(
JsonRpcResponse(
id = jsonRpcRequest.id,
@@ -320,7 +320,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
call.respond(
JsonRpcResponse(
id = jsonRpcRequest.id,
@@ -374,7 +374,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
call.respond(
JsonRpcResponse(
id = jsonRpcRequest.id,
@@ -478,7 +478,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
call.respond(
JsonRpcResponse(
id = jsonRpcRequest.id,
diff --git a/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/types/Date.kt b/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
index 09ba6d01..61f8ba58 100644
--- a/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
+++ b/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
@@ -36,9 +36,6 @@ import java.time.OffsetTime
import java.time.format.DateTimeFormatter
import java.time.format.DateTimeParseException
-@Deprecated("Not supported in KVision 2+. Use LocalDateTime or OffsetDateTime instead.", level = DeprecationLevel.ERROR)
-actual typealias Date = LocalDateTime
-
actual typealias LocalDateTime = LocalDateTime
actual typealias LocalDate = LocalDate
diff --git a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
index 34fb02db..2ee939ef 100644
--- a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
+++ b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
@@ -35,7 +35,6 @@ import kotlinx.coroutines.reactive.awaitSingle
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.context.ApplicationContext
-import org.springframework.security.core.Authentication
import org.springframework.web.reactive.function.server.ServerRequest
import org.springframework.web.reactive.function.server.ServerResponse
import org.springframework.web.reactive.function.server.awaitBody
@@ -143,7 +142,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
ServerResponse.ok().json().bodyValueAndAwait(
mapper.writeValueAsString(
JsonRpcResponse(
@@ -188,7 +187,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
ServerResponse.ok().json().bodyValueAndAwait(
mapper.writeValueAsString(
JsonRpcResponse(
@@ -244,7 +243,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
ServerResponse.ok().json().bodyValueAndAwait(
mapper.writeValueAsString(
JsonRpcResponse(
@@ -302,7 +301,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
ServerResponse.ok().json().bodyValueAndAwait(
mapper.writeValueAsString(
JsonRpcResponse(
@@ -361,7 +360,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
ServerResponse.ok().json().bodyValueAndAwait(
mapper.writeValueAsString(
JsonRpcResponse(
@@ -422,7 +421,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
ServerResponse.ok().json().bodyValueAndAwait(
mapper.writeValueAsString(
JsonRpcResponse(
@@ -531,7 +530,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
)
)
} catch (e: Exception) {
- if (!(e is ServiceException)) LOG.error(e.message, e)
+ if (e !is ServiceException) LOG.error(e.message, e)
ServerResponse.ok().json().bodyValueAndAwait(
mapper.writeValueAsString(
JsonRpcResponse(
diff --git a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/types/Date.kt b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
index 09ba6d01..61f8ba58 100644
--- a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
+++ b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
@@ -36,9 +36,6 @@ import java.time.OffsetTime
import java.time.format.DateTimeFormatter
import java.time.format.DateTimeParseException
-@Deprecated("Not supported in KVision 2+. Use LocalDateTime or OffsetDateTime instead.", level = DeprecationLevel.ERROR)
-actual typealias Date = LocalDateTime
-
actual typealias LocalDateTime = LocalDateTime
actual typealias LocalDate = LocalDate