From 8419fc9281352530b9f4573d5bfb99deb0df2db9 Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Wed, 25 May 2016 11:46:40 +0200 Subject: [PATCH] Minor inline code comment to clarify TestClass has intentional CS issues Change-Id: I96133746447dd909cb55b45cbe4dfdca278b1bde Signed-off-by: Michael Vorburger --- .../checkstyle/CheckLoggingTestClass.java | 1 + .../yangtools/checkstyle/CheckstyleTest.java | 20 +++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckLoggingTestClass.java b/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckLoggingTestClass.java index f038dda5f5..ed5a1719cf 100644 --- a/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckLoggingTestClass.java +++ b/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckLoggingTestClass.java @@ -11,6 +11,7 @@ package org.opendaylight.yangtools.checkstyle; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +// NOTE: This test class contains intentional checkstyle issues, for CheckstyleTest public class CheckLoggingTestClass { final Logger logger = LoggerFactory.getLogger(CheckstyleTest.class); private static final java.util.logging.Logger LOG2 = java.util.logging.Logger.getGlobal(); diff --git a/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckstyleTest.java b/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckstyleTest.java index 0fe027b0af..977b61a9c9 100644 --- a/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckstyleTest.java +++ b/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckstyleTest.java @@ -55,17 +55,17 @@ public class CheckstyleTest { @Test public void testLoggerChecks() throws Exception { verify(CheckLoggingTestClass.class, true, - "15: Logger must be declared as private static final", - "15: Logger name should be LOG", - "15: LoggerFactory.getLogger Class argument is incorrect", - "17: Logger might be declared only once", - "16: Logger must be slf4j", - "22: Line contains printStacktrace", - "23: Line contains console output", + "16: Logger must be declared as private static final", + "16: Logger name should be LOG", + "16: LoggerFactory.getLogger Class argument is incorrect", + "18: Logger might be declared only once", + "17: Logger must be slf4j", + "23: Line contains printStacktrace", "24: Line contains console output", - "26: Log message placeholders count is incorrect", - "32: Log message placeholders count is incorrect", - "41: Log message contains string concatenation"); + "25: Line contains console output", + "27: Log message placeholders count is incorrect", + "33: Log message placeholders count is incorrect", + "42: Log message contains string concatenation"); } @Test -- 2.36.6