From acdbc55974c3fd6b6e532a29e443bce60016791f Mon Sep 17 00:00:00 2001 From: rnveach Date: Fri, 28 Jul 2017 15:03:23 -0400 Subject: [PATCH] Issue #4592: removed BaseFileSetCheckTestSupport --- .../BaseFileSetCheckTestSupport.java | 37 ------------------- .../imports/UnusedImportsCheckTest.java | 16 ++++---- .../InputAvoidStarImportDefault.java | 1 - .../InputAvoidStaticImportDefault.java | 1 - .../InputIllegalImportDefault.java | 1 - .../InputRedundantImportWithChecker.java | 1 - .../unusedimports/InputUnusedImports.java | 1 - 7 files changed, 7 insertions(+), 51 deletions(-) delete mode 100644 src/test/java/com/puppycrawl/tools/checkstyle/BaseFileSetCheckTestSupport.java diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/BaseFileSetCheckTestSupport.java b/src/test/java/com/puppycrawl/tools/checkstyle/BaseFileSetCheckTestSupport.java deleted file mode 100644 index 634d72d7ee0..00000000000 --- a/src/test/java/com/puppycrawl/tools/checkstyle/BaseFileSetCheckTestSupport.java +++ /dev/null @@ -1,37 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// checkstyle: Checks Java source code for adherence to a set of rules. -// Copyright (C) 2001-2017 the original author or authors. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//////////////////////////////////////////////////////////////////////////////// - -package com.puppycrawl.tools.checkstyle; - -import com.puppycrawl.tools.checkstyle.api.Configuration; - -public class BaseFileSetCheckTestSupport extends AbstractModuleTestSupport { - @Override - protected String getPackageLocation() { - return ""; - } - - @Override - protected DefaultConfiguration createCheckerConfig( - Configuration config) { - final DefaultConfiguration dc = new DefaultConfiguration("root"); - dc.addChild(config); - return dc; - } -} diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheckTest.java index ed3bb7fe5dc..d244572a258 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheckTest.java @@ -59,18 +59,16 @@ public void testWithoutProcessJavadoc() throws Exception { "35:8: " + getCheckMessage(MSG_KEY, "java.util.BitSet"), "37:8: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.Checker"), "38:8: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.CheckerTest"), - "39:8: " + getCheckMessage(MSG_KEY, - "com.puppycrawl.tools.checkstyle.BaseFileSetCheckTestSupport"), - "40:8: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.Definitions"), - "41:8: " + getCheckMessage(MSG_KEY, + "39:8: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.Definitions"), + "40:8: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.checks.imports.unusedimports.Input15Extensions"), - "42:8: " + getCheckMessage(MSG_KEY, + "41:8: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.ConfigurationLoaderTest"), - "43:8: " + getCheckMessage(MSG_KEY, + "42:8: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.PackageNamesLoader"), - "44:8: " + getCheckMessage(MSG_KEY, + "43:8: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.DefaultConfiguration"), - "45:8: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.DefaultLogger"), + "44:8: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.DefaultLogger"), }; verify(checkConfig, getPath("InputUnusedImports.java"), expected); } @@ -91,7 +89,7 @@ public void testProcessJavadoc() throws Exception { "27:15: " + getCheckMessage(MSG_KEY, "java.io.File.createTempFile"), //"29:8: Unused import - java.awt.Component.", // Should be detected "32:8: " + getCheckMessage(MSG_KEY, "java.awt.Label"), - "45:8: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.DefaultLogger"), + "44:8: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.DefaultLogger"), }; verify(checkConfig, getPath("InputUnusedImports.java"), expected); } diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/avoidstarimport/InputAvoidStarImportDefault.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/avoidstarimport/InputAvoidStarImportDefault.java index 11bc8b7584f..dc864b0613e 100644 --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/avoidstarimport/InputAvoidStarImportDefault.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/avoidstarimport/InputAvoidStarImportDefault.java @@ -37,7 +37,6 @@ import com.puppycrawl.tools.checkstyle.Checker; import com.puppycrawl.tools.checkstyle.CheckerTest; -import com.puppycrawl.tools.checkstyle.BaseFileSetCheckTestSupport; import com.puppycrawl.tools.checkstyle.Definitions; import com.puppycrawl.tools.checkstyle.checks.imports.unusedimports.Input15Extensions; import com.puppycrawl.tools.checkstyle.ConfigurationLoaderTest; diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/avoidstaticimport/InputAvoidStaticImportDefault.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/avoidstaticimport/InputAvoidStaticImportDefault.java index 7021edf3cf1..3a1de36ee1c 100644 --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/avoidstaticimport/InputAvoidStaticImportDefault.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/avoidstaticimport/InputAvoidStaticImportDefault.java @@ -39,7 +39,6 @@ import com.puppycrawl.tools.checkstyle.Checker; import com.puppycrawl.tools.checkstyle.CheckerTest; -import com.puppycrawl.tools.checkstyle.BaseFileSetCheckTestSupport; import com.puppycrawl.tools.checkstyle.Definitions; import com.puppycrawl.tools.checkstyle.checks.imports.unusedimports.Input15Extensions; import com.puppycrawl.tools.checkstyle.ConfigurationLoaderTest; diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/illegalimport/InputIllegalImportDefault.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/illegalimport/InputIllegalImportDefault.java index a3657c23fc9..f2e69d329cc 100644 --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/illegalimport/InputIllegalImportDefault.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/illegalimport/InputIllegalImportDefault.java @@ -37,7 +37,6 @@ import com.puppycrawl.tools.checkstyle.Checker; import com.puppycrawl.tools.checkstyle.CheckerTest; -import com.puppycrawl.tools.checkstyle.BaseFileSetCheckTestSupport; import com.puppycrawl.tools.checkstyle.Definitions; import com.puppycrawl.tools.checkstyle.checks.imports.unusedimports.Input15Extensions; import com.puppycrawl.tools.checkstyle.ConfigurationLoaderTest; diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/redundantimport/InputRedundantImportWithChecker.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/redundantimport/InputRedundantImportWithChecker.java index 12d0c6aec31..239145ada6d 100644 --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/redundantimport/InputRedundantImportWithChecker.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/redundantimport/InputRedundantImportWithChecker.java @@ -37,7 +37,6 @@ import com.puppycrawl.tools.checkstyle.Checker; import com.puppycrawl.tools.checkstyle.CheckerTest; -import com.puppycrawl.tools.checkstyle.BaseFileSetCheckTestSupport; import com.puppycrawl.tools.checkstyle.Definitions; import com.puppycrawl.tools.checkstyle.checks.imports.unusedimports.Input15Extensions; import com.puppycrawl.tools.checkstyle.ConfigurationLoaderTest; diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/unusedimports/InputUnusedImports.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/unusedimports/InputUnusedImports.java index 6a24b7d244e..209de5a8921 100644 --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/unusedimports/InputUnusedImports.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/unusedimports/InputUnusedImports.java @@ -36,7 +36,6 @@ import com.puppycrawl.tools.checkstyle.Checker; import com.puppycrawl.tools.checkstyle.CheckerTest; -import com.puppycrawl.tools.checkstyle.BaseFileSetCheckTestSupport; import com.puppycrawl.tools.checkstyle.Definitions; import com.puppycrawl.tools.checkstyle.checks.imports.unusedimports.Input15Extensions; import com.puppycrawl.tools.checkstyle.ConfigurationLoaderTest;