From 4d869fa7648ef8652dd9e1537e0bd41f5f8c47b1 Mon Sep 17 00:00:00 2001 From: Hardik Chawla Date: Sun, 16 Jan 2022 17:39:36 +0530 Subject: [PATCH 1/2] [bug-fix][jackson] fixing class not found exception --- .../github/thewisenerd/linters/sidekt/rules/SQLQuerySniffer.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/io/github/thewisenerd/linters/sidekt/rules/SQLQuerySniffer.kt b/src/main/kotlin/io/github/thewisenerd/linters/sidekt/rules/SQLQuerySniffer.kt index 2a69598..9b1b24e 100644 --- a/src/main/kotlin/io/github/thewisenerd/linters/sidekt/rules/SQLQuerySniffer.kt +++ b/src/main/kotlin/io/github/thewisenerd/linters/sidekt/rules/SQLQuerySniffer.kt @@ -1,5 +1,6 @@ package io.github.thewisenerd.linters.sidekt.rules +import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.KotlinModule import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import io.github.thewisenerd.linters.sidekt.helpers.Debugger @@ -268,7 +269,7 @@ class SQLQuerySniffer(config: Config): Rule(config) { private val stringTemplateMarker = "@UseStringTemplate3StatementLocator" private var scanResourceFiles = false - private val objectMapper by lazy { jacksonObjectMapper().registerModule(KotlinModule()) } + private val objectMapper by lazy { ObjectMapper() } } } From 71ca0e790cd8329a76ec436b6b884c78239abe88 Mon Sep 17 00:00:00 2001 From: Hardik Chawla Date: Sun, 16 Jan 2022 17:40:38 +0530 Subject: [PATCH 2/2] code cleanup --- .../github/thewisenerd/linters/sidekt/rules/SQLQuerySniffer.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/kotlin/io/github/thewisenerd/linters/sidekt/rules/SQLQuerySniffer.kt b/src/main/kotlin/io/github/thewisenerd/linters/sidekt/rules/SQLQuerySniffer.kt index 9b1b24e..c42fdc0 100644 --- a/src/main/kotlin/io/github/thewisenerd/linters/sidekt/rules/SQLQuerySniffer.kt +++ b/src/main/kotlin/io/github/thewisenerd/linters/sidekt/rules/SQLQuerySniffer.kt @@ -1,8 +1,6 @@ package io.github.thewisenerd.linters.sidekt.rules import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.module.kotlin.KotlinModule -import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import io.github.thewisenerd.linters.sidekt.helpers.Debugger import io.gitlab.arturbosch.detekt.api.* import org.jetbrains.kotlin.psi.*