From e4b5290e4898858612da882d9186b2aba548a9d9 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Thu, 27 Feb 2020 15:28:16 +0100 Subject: Remove deprecated methods. Style fixes. --- .../kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt | 14 +++++++------- .../src/main/kotlin/pl/treksoft/kvision/types/Date.kt | 3 --- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'kvision-modules/kvision-server-javalin/src/main/kotlin') 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 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 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 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 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 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 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 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 -- cgit