From 8257e1405543faf49bf789c990b805617d41c88e Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 5 Dec 2017 18:21:22 +0300 Subject: [PATCH] J2K: perform additional isActiveFor check before applying inspections --- .../org/jetbrains/kotlin/idea/j2k/J2kPostProcessings.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/j2k/J2kPostProcessings.kt b/idea/src/org/jetbrains/kotlin/idea/j2k/J2kPostProcessings.kt index d4764a893b6..45104863400 100644 --- a/idea/src/org/jetbrains/kotlin/idea/j2k/J2kPostProcessings.kt +++ b/idea/src/org/jetbrains/kotlin/idea/j2k/J2kPostProcessings.kt @@ -280,7 +280,9 @@ object J2KPostProcessingRegistrar { if (!ReplacePutWithAssignmentInspection.isActiveFor(element)) return null return { - ReplacePutWithAssignmentInspection.simplify(element) + if (ReplacePutWithAssignmentInspection.isActiveFor(element)) { + ReplacePutWithAssignmentInspection.simplify(element) + } } } } @@ -295,7 +297,9 @@ object J2KPostProcessingRegistrar { if (!inspection.isActiveFor(element)) return null return { - inspection.simplify(element, false) + if (inspection.isActiveFor(element)) { + inspection.simplify(element, false) + } } } }