diff --git a/jvm/jvm-analysis-impl/resources/messages/JvmAnalysisBundle.properties b/jvm/jvm-analysis-impl/resources/messages/JvmAnalysisBundle.properties index 1fc0d3aa931e..1c160a04ba98 100644 --- a/jvm/jvm-analysis-impl/resources/messages/JvmAnalysisBundle.properties +++ b/jvm/jvm-analysis-impl/resources/messages/JvmAnalysisBundle.properties @@ -174,8 +174,8 @@ jvm.inspection.log.statement.not.guarded.debug.level.and.lower.option=debug leve jvm.inspection.log.statement.not.guarded.trace.level.option=trace level jvm.inspection.log.statement.not.guarded.unguarded.constant.option=Process unguarded logging calls with constant messages jvm.inspection.log.statement.not.guarded.unguarded.constant.option.comment=Process all unguarded log calls, not only those with non-constant arguments -jvm.inspection.log.statement.not.guarded.log.fix.family.name=Surround with log condition -jvm.inspection.log.statement.not.guarded.log.problem.descriptor=Logging call not guarded by log condition #loc +jvm.inspection.log.statement.not.guarded.log.fix.family.name=Surround with a logging condition +jvm.inspection.log.statement.not.guarded.log.problem.descriptor=Logging call not guarded by a logging condition #loc jvm.inspection.log.guarded.display.name=Logging calls guarded by log condition jvm.inspection.log.guarded.warn.if.fix.possible=Warn only if a fix is available diff --git a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/logging/JavaLoggingStatementNotGuardedByLogConditionInspectionTest.kt b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/logging/JavaLoggingStatementNotGuardedByLogConditionInspectionTest.kt index 0ef5905b989d..b44710c0ed17 100644 --- a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/logging/JavaLoggingStatementNotGuardedByLogConditionInspectionTest.kt +++ b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/logging/JavaLoggingStatementNotGuardedByLogConditionInspectionTest.kt @@ -12,7 +12,7 @@ class JavaLoggingStatementNotGuardedByLogConditionInspectionTest : LoggingStatem class X { private static final Logger LOG = LoggerFactory.getLogger(X.class); void n(String arg) { - LOG.debug("test" + arg); + LOG.debug("test" + arg); } } """.trimIndent()) @@ -38,7 +38,7 @@ class JavaLoggingStatementNotGuardedByLogConditionInspectionTest : LoggingStatem class X { static final Logger LOG = LogManager.getLogger(); void n(String arg) { - LOG.debug("test" + arg); + LOG.debug("test" + arg); } } """.trimIndent()) @@ -81,7 +81,7 @@ class JavaLoggingStatementNotGuardedByLogConditionInspectionTest : LoggingStatem } if(LOG.isInfoEnabled()) { - LOG.debug("test" + arg); //todo! + LOG.debug("test" + arg); //todo! } if(true && LOG.isDebugEnabled()) { @@ -96,7 +96,7 @@ class JavaLoggingStatementNotGuardedByLogConditionInspectionTest : LoggingStatem if(true) { if(true) { - LOG.debug("test" + arg); + LOG.debug("test" + arg); } } } @@ -143,10 +143,10 @@ class JavaLoggingStatementNotGuardedByLogConditionInspectionTest : LoggingStatem class X { private static final Logger LOG = LoggerFactory.getLogger(X.class); void n1(String arg) { - LOG.debug("test"); + LOG.debug("test"); } void n2(String arg) { - LOG.debug("test"); + LOG.debug("test"); } } """.trimIndent()) @@ -159,28 +159,28 @@ class JavaLoggingStatementNotGuardedByLogConditionInspectionTest : LoggingStatem class X { private static final Logger LOG = LoggerFactory.getLogger(X.class); void n2(String arg) { - LOG.debug("test1" + arg); + LOG.debug("test1" + arg); LOG.debug("test2" + arg); } void n3(String arg) { - LOG.debug("test1" + arg); + LOG.debug("test1" + arg); LOG.debug("test2" + arg); LOG.debug("test2" + arg); } void constantCall(String arg) { LOG.debug("test1"); - LOG.debug("test2" + arg); + LOG.debug("test2" + arg); } void beforeNotLog(String arg) { constantCall(arg); - LOG.debug("test2" + arg); + LOG.debug("test2" + arg); } void differentLevels(String arg) { - LOG.debug("test1" + arg); + LOG.debug("test1" + arg); LOG.warn("test2" + arg); } } diff --git a/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/logging/KotlinLoggingStatementNotGuardedByLogConditionInspectionTest.kt b/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/logging/KotlinLoggingStatementNotGuardedByLogConditionInspectionTest.kt index e49f2860f463..e08d74499611 100644 --- a/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/logging/KotlinLoggingStatementNotGuardedByLogConditionInspectionTest.kt +++ b/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/logging/KotlinLoggingStatementNotGuardedByLogConditionInspectionTest.kt @@ -14,7 +14,7 @@ class KotlinLoggingStatementNotGuardedByLogConditionInspectionTest : LoggingStat private val LOG = LoggerFactory.getLogger() fun n(arg: String) { - LOG.debug("test {}", arg) + LOG.debug("test {}", arg) } } """.trimIndent()) @@ -27,7 +27,7 @@ class KotlinLoggingStatementNotGuardedByLogConditionInspectionTest : LoggingStat internal class X { fun n(arg: String) { - LOG.debug("test {}", arg) + LOG.debug("test {}", arg) } companion object { @@ -66,7 +66,7 @@ class KotlinLoggingStatementNotGuardedByLogConditionInspectionTest : LoggingStat } if (LOG.isInfoEnabled) { - LOG.debug("test" + arg) //todo! + LOG.debug("test" + arg) //todo! } if (true && LOG.isDebugEnabled) { @@ -112,11 +112,11 @@ class KotlinLoggingStatementNotGuardedByLogConditionInspectionTest : LoggingStat internal class X { fun n1() { - LOG.debug("test") + LOG.debug("test") } fun n2() { - LOG.debug("test") + LOG.debug("test") } companion object { @@ -133,28 +133,28 @@ class KotlinLoggingStatementNotGuardedByLogConditionInspectionTest : LoggingStat internal class X { fun n2(arg: String) { - LOG.debug("test1" + arg) + LOG.debug("test1" + arg) LOG.debug("test2" + arg) } fun n3(arg: String) { - LOG.debug("test1" + arg) + LOG.debug("test1" + arg) LOG.debug("test2" + arg) LOG.debug("test2" + arg) } fun constantCall(arg: String) { LOG.debug("test1") - LOG.debug("test2" + arg) + LOG.debug("test2" + arg) } fun beforeNotLog(arg: String) { constantCall(arg) - LOG.debug("test2" + arg) + LOG.debug("test2" + arg) } fun differentLevels(arg: String) { - LOG.debug("test1" + arg) + LOG.debug("test1" + arg) LOG.warn("test2" + arg) }