From 8591ca2f4791531ac81b76956e3e837fd12e0003 Mon Sep 17 00:00:00 2001 From: MANISH-K-07 Date: Fri, 29 Mar 2024 08:08:25 +0100 Subject: [PATCH] Issue #14715: Enforced new naming convention in IT area Four --- .../XpathRegressionGenericWhitespaceTest.java | 46 +++++++++---------- .../XpathRegressionHiddenFieldTest.java | 12 ++--- .../XpathRegressionIllegalCatchTest.java | 8 ++-- .../XpathRegressionIllegalImportTest.java | 8 ++-- ...va => InputXpathGenericWhitespaceEnd.java} | 2 +- ...InputXpathGenericWhitespaceNestedOne.java} | 2 +- ...putXpathGenericWhitespaceNestedThree.java} | 2 +- ...InputXpathGenericWhitespaceNestedTwo.java} | 2 +- ...InputXpathGenericWhitespaceSingleOne.java} | 2 +- ...InputXpathGenericWhitespaceSingleTwo.java} | 2 +- ... InputXpathGenericWhitespaceStartOne.java} | 2 +- ...nputXpathGenericWhitespaceStartThree.java} | 2 +- ... InputXpathGenericWhitespaceStartTwo.java} | 2 +- ...pathHiddenFieldLambdaExpInMethodCall.java} | 2 +- ... => InputXpathHiddenFieldMethodParam.java} | 2 +- ...ne.java => InputXpathIllegalCatchOne.java} | 2 +- ...wo.java => InputXpathIllegalCatchTwo.java} | 2 +- ...va => InputXpathIllegalImportDefault.java} | 2 +- ...ava => InputXpathIllegalImportStatic.java} | 2 +- .../internal/XpathRegressionTest.java | 4 -- 20 files changed, 52 insertions(+), 56 deletions(-) rename src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/{SuppressionXpathRegressionGenericWhitespaceEnd.java => InputXpathGenericWhitespaceEnd.java} (74%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/{SuppressionXpathRegressionGenericWhitespaceNestedGenericsOne.java => InputXpathGenericWhitespaceNestedOne.java} (74%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/{SuppressionXpathRegressionGenericWhitespaceNestedGenericsThree.java => InputXpathGenericWhitespaceNestedThree.java} (71%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/{SuppressionXpathRegressionGenericWhitespaceNestedGenericsTwo.java => InputXpathGenericWhitespaceNestedTwo.java} (74%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/{SuppressionXpathRegressionGenericWhitespaceSingleGenericOne.java => InputXpathGenericWhitespaceSingleOne.java} (73%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/{SuppressionXpathRegressionGenericWhitespaceSingleGenericTwo.java => InputXpathGenericWhitespaceSingleTwo.java} (67%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/{SuppressionXpathRegressionGenericWhitespaceStartOne.java => InputXpathGenericWhitespaceStartOne.java} (72%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/{SuppressionXpathRegressionGenericWhitespaceStartThree.java => InputXpathGenericWhitespaceStartThree.java} (70%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/{SuppressionXpathRegressionGenericWhitespaceStartTwo.java => InputXpathGenericWhitespaceStartTwo.java} (76%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/{SuppressionXpathRegressionHiddenFieldOne.java => InputXpathHiddenFieldLambdaExpInMethodCall.java} (83%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/{SuppressionXpathRegressionHiddenFieldTwo.java => InputXpathHiddenFieldMethodParam.java} (79%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/{SuppressionXpathRegressionIllegalCatchOne.java => InputXpathIllegalCatchOne.java} (74%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/{SuppressionXpathRegressionIllegalCatchTwo.java => InputXpathIllegalCatchTwo.java} (86%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/{SuppressionXpathRegressionIllegalImportOne.java => InputXpathIllegalImportDefault.java} (62%) rename src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/{SuppressionXpathRegressionIllegalImportTwo.java => InputXpathIllegalImportStatic.java} (64%) diff --git a/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionGenericWhitespaceTest.java b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionGenericWhitespaceTest.java index 0227fea75ef..796325a6412 100644 --- a/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionGenericWhitespaceTest.java +++ b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionGenericWhitespaceTest.java @@ -41,7 +41,7 @@ protected String getCheckName() { @Test public void testProcessEnd() throws Exception { final File fileToProcess = new File( - getPath("SuppressionXpathRegressionGenericWhitespaceEnd.java")); + getPath("InputXpathGenericWhitespaceEnd.java")); final DefaultConfiguration moduleConfig = createModuleConfig(GenericWhitespaceCheck.class); @@ -53,7 +53,7 @@ public void testProcessEnd() throws Exception { final List expectedXpathQueries = Collections.singletonList( "/COMPILATION_UNIT/CLASS_DEF" - + "[./IDENT[@text='SuppressionXpathRegressionGenericWhitespaceEnd']]/OBJBLOCK" + + "[./IDENT[@text='InputXpathGenericWhitespaceEnd']]/OBJBLOCK" + "/METHOD_DEF[./IDENT[@text='bad']]" + "/PARAMETERS/PARAMETER_DEF[./IDENT[@text='cls']]" + "/TYPE[./IDENT[@text='Class']]/TYPE_ARGUMENTS/GENERIC_END" @@ -66,7 +66,7 @@ public void testProcessEnd() throws Exception { @Test public void testProcessNestedGenericsOne() throws Exception { final File fileToProcess = new File( - getPath("SuppressionXpathRegressionGenericWhitespaceNestedGenericsOne.java")); + getPath("InputXpathGenericWhitespaceNestedOne.java")); final DefaultConfiguration moduleConfig = createModuleConfig(GenericWhitespaceCheck.class); @@ -78,7 +78,7 @@ public void testProcessNestedGenericsOne() throws Exception { final List expectedXpathQueries = Collections.singletonList( "/COMPILATION_UNIT/CLASS_DEF[./IDENT[" - + "@text='SuppressionXpathRegressionGenericWhitespaceNestedGenericsOne']]" + + "@text='InputXpathGenericWhitespaceNestedOne']]" + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='bad']]/TYPE_PARAMETERS" + "/TYPE_PARAMETER[./IDENT[@text='E']]" + "/TYPE_UPPER_BOUNDS[./IDENT[@text='Enum']]/TYPE_ARGUMENTS/GENERIC_END" @@ -91,7 +91,7 @@ public void testProcessNestedGenericsOne() throws Exception { @Test public void testProcessNestedGenericsTwo() throws Exception { final File fileToProcess = new File( - getPath("SuppressionXpathRegressionGenericWhitespaceNestedGenericsTwo.java")); + getPath("InputXpathGenericWhitespaceNestedTwo.java")); final DefaultConfiguration moduleConfig = createModuleConfig(GenericWhitespaceCheck.class); @@ -103,7 +103,7 @@ public void testProcessNestedGenericsTwo() throws Exception { final List expectedXpathQueries = Collections.singletonList( "/COMPILATION_UNIT/CLASS_DEF[./IDENT[" - + "@text='SuppressionXpathRegressionGenericWhitespaceNestedGenericsTwo']]" + + "@text='InputXpathGenericWhitespaceNestedTwo']]" + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='bad']]/TYPE_PARAMETERS" + "/TYPE_PARAMETER[./IDENT[@text='E']]" + "/TYPE_UPPER_BOUNDS[./IDENT[@text='Enum']]/TYPE_ARGUMENTS/GENERIC_END" @@ -116,7 +116,7 @@ public void testProcessNestedGenericsTwo() throws Exception { @Test public void testProcessNestedGenericsThree() throws Exception { final File fileToProcess = new File( - getPath("SuppressionXpathRegressionGenericWhitespaceNestedGenericsThree.java")); + getPath("InputXpathGenericWhitespaceNestedThree.java")); final DefaultConfiguration moduleConfig = createModuleConfig(GenericWhitespaceCheck.class); @@ -128,7 +128,7 @@ public void testProcessNestedGenericsThree() throws Exception { final List expectedXpathQueries = Collections.singletonList( "/COMPILATION_UNIT/CLASS_DEF[./IDENT[" - + "@text='SuppressionXpathRegressionGenericWhitespaceNestedGenericsThree']]" + + "@text='InputXpathGenericWhitespaceNestedThree']]" + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='bad']]/TYPE_PARAMETERS" + "/TYPE_PARAMETER[./IDENT[@text='E']]" + "/TYPE_UPPER_BOUNDS[./IDENT[@text='Enum']]/TYPE_ARGUMENTS/GENERIC_END" @@ -141,7 +141,7 @@ public void testProcessNestedGenericsThree() throws Exception { @Test public void testProcessSingleGenericOne() throws Exception { final File fileToProcess = new File( - getPath("SuppressionXpathRegressionGenericWhitespaceSingleGenericOne.java")); + getPath("InputXpathGenericWhitespaceSingleOne.java")); final DefaultConfiguration moduleConfig = createModuleConfig(GenericWhitespaceCheck.class); @@ -153,7 +153,7 @@ public void testProcessSingleGenericOne() throws Exception { final List expectedXpathQueries = Collections.singletonList( "/COMPILATION_UNIT/CLASS_DEF[./IDENT[" - + "@text='SuppressionXpathRegressionGenericWhitespaceSingleGenericOne']]" + + "@text='InputXpathGenericWhitespaceSingleOne']]" + "/OBJBLOCK/VARIABLE_DEF[./IDENT[@text='bad']]/ASSIGN/EXPR/METHOD_CALL" + "/DOT[./IDENT[@text='Collections']]" + "/TYPE_ARGUMENTS/GENERIC_END" @@ -166,7 +166,7 @@ public void testProcessSingleGenericOne() throws Exception { @Test public void testProcessSingleGenericTwo() throws Exception { final File fileToProcess = new File( - getPath("SuppressionXpathRegressionGenericWhitespaceSingleGenericTwo.java")); + getPath("InputXpathGenericWhitespaceSingleTwo.java")); final DefaultConfiguration moduleConfig = createModuleConfig(GenericWhitespaceCheck.class); @@ -178,7 +178,7 @@ public void testProcessSingleGenericTwo() throws Exception { final List expectedXpathQueries = Collections.singletonList( "/COMPILATION_UNIT/CLASS_DEF[./IDENT[" - + "@text='SuppressionXpathRegressionGenericWhitespaceSingleGenericTwo']]" + + "@text='InputXpathGenericWhitespaceSingleTwo']]" + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='bad']]/TYPE_PARAMETERS/GENERIC_END" ); @@ -189,7 +189,7 @@ public void testProcessSingleGenericTwo() throws Exception { @Test public void testProcessStartOne() throws Exception { final File fileToProcess = new File( - getPath("SuppressionXpathRegressionGenericWhitespaceStartOne.java")); + getPath("InputXpathGenericWhitespaceStartOne.java")); final DefaultConfiguration moduleConfig = createModuleConfig(GenericWhitespaceCheck.class); @@ -201,10 +201,10 @@ public void testProcessStartOne() throws Exception { final List expectedXpathQueries = Arrays.asList( "/COMPILATION_UNIT/CLASS_DEF[./IDENT" - + "[@text='SuppressionXpathRegressionGenericWhitespaceStartOne']]" + + "[@text='InputXpathGenericWhitespaceStartOne']]" + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='bad']]/TYPE_PARAMETERS", "/COMPILATION_UNIT/CLASS_DEF[./IDENT" - + "[@text='SuppressionXpathRegressionGenericWhitespaceStartOne']]" + + "[@text='InputXpathGenericWhitespaceStartOne']]" + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='bad']]/TYPE_PARAMETERS/GENERIC_START" ); @@ -215,7 +215,7 @@ public void testProcessStartOne() throws Exception { @Test public void testProcessStartTwo() throws Exception { final File fileToProcess = new File( - getPath("SuppressionXpathRegressionGenericWhitespaceStartTwo.java")); + getPath("InputXpathGenericWhitespaceStartTwo.java")); final DefaultConfiguration moduleConfig = createModuleConfig(GenericWhitespaceCheck.class); @@ -227,12 +227,12 @@ public void testProcessStartTwo() throws Exception { final List expectedXpathQueries = Arrays.asList( "/COMPILATION_UNIT/CLASS_DEF[./IDENT" - + "[@text='SuppressionXpathRegressionGenericWhitespaceStartTwo']]" + + "[@text='InputXpathGenericWhitespaceStartTwo']]" + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='bad']]/PARAMETERS" + "/PARAMETER_DEF[./IDENT[@text='consumer']]" + "/TYPE[./IDENT[@text='Consumer']]/TYPE_ARGUMENTS", "/COMPILATION_UNIT/CLASS_DEF[./IDENT" - + "[@text='SuppressionXpathRegressionGenericWhitespaceStartTwo']]" + + "[@text='InputXpathGenericWhitespaceStartTwo']]" + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='bad']]/PARAMETERS" + "/PARAMETER_DEF[./IDENT[@text='consumer']]" + "/TYPE[./IDENT[@text='Consumer']]/TYPE_ARGUMENTS/GENERIC_START" @@ -245,7 +245,7 @@ public void testProcessStartTwo() throws Exception { @Test public void testProcessStartThree() throws Exception { final File fileToProcess = new File( - getPath("SuppressionXpathRegressionGenericWhitespaceStartThree.java")); + getPath("InputXpathGenericWhitespaceStartThree.java")); final DefaultConfiguration moduleConfig = createModuleConfig(GenericWhitespaceCheck.class); @@ -257,16 +257,16 @@ public void testProcessStartThree() throws Exception { final List expectedXpathQueries = Arrays.asList( "/COMPILATION_UNIT/CLASS_DEF[./IDENT" - + "[@text='SuppressionXpathRegressionGenericWhitespaceStartThree']]" + + "[@text='InputXpathGenericWhitespaceStartThree']]" + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='bad']]", "/COMPILATION_UNIT/CLASS_DEF[./IDENT" - + "[@text='SuppressionXpathRegressionGenericWhitespaceStartThree']]" + + "[@text='InputXpathGenericWhitespaceStartThree']]" + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='bad']]/MODIFIERS", "/COMPILATION_UNIT/CLASS_DEF[./IDENT" - + "[@text='SuppressionXpathRegressionGenericWhitespaceStartThree']]" + + "[@text='InputXpathGenericWhitespaceStartThree']]" + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='bad']]/TYPE_PARAMETERS", "/COMPILATION_UNIT/CLASS_DEF[./IDENT" - + "[@text='SuppressionXpathRegressionGenericWhitespaceStartThree']]" + + "[@text='InputXpathGenericWhitespaceStartThree']]" + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='bad']]/TYPE_PARAMETERS/GENERIC_START" ); diff --git a/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionHiddenFieldTest.java b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionHiddenFieldTest.java index 2a60345ce6e..59e846a9279 100644 --- a/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionHiddenFieldTest.java +++ b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionHiddenFieldTest.java @@ -38,9 +38,9 @@ protected String getCheckName() { } @Test - public void testOne() throws Exception { + public void testLambdaExpInMethodCall() throws Exception { final File fileToProcess = - new File(getPath("SuppressionXpathRegressionHiddenFieldOne.java")); + new File(getPath("InputXpathHiddenFieldLambdaExpInMethodCall.java")); final DefaultConfiguration moduleConfig = createModuleConfig(HiddenFieldCheck.class); @@ -52,7 +52,7 @@ public void testOne() throws Exception { final List expectedXpathQueries = Collections.singletonList( "/COMPILATION_UNIT/CLASS_DEF" - + "[./IDENT[@text='SuppressionXpathRegressionHiddenFieldOne']]/OBJBLOCK" + + "[./IDENT[@text='InputXpathHiddenFieldLambdaExpInMethodCall']]/OBJBLOCK" + "/INSTANCE_INIT/SLIST/EXPR/METHOD_CALL/ELIST/LAMBDA/PARAMETERS" + "/PARAMETER_DEF/IDENT[@text='value']" ); @@ -62,9 +62,9 @@ public void testOne() throws Exception { } @Test - public void testTwo() throws Exception { + public void testMethodParam() throws Exception { final File fileToProcess = - new File(getPath("SuppressionXpathRegressionHiddenFieldTwo.java")); + new File(getPath("InputXpathHiddenFieldMethodParam.java")); final DefaultConfiguration moduleConfig = createModuleConfig(HiddenFieldCheck.class); @@ -76,7 +76,7 @@ public void testTwo() throws Exception { final List expectedXpathQueries = Collections.singletonList( "/COMPILATION_UNIT/CLASS_DEF" - + "[./IDENT[@text='SuppressionXpathRegressionHiddenFieldTwo']]/OBJBLOCK" + + "[./IDENT[@text='InputXpathHiddenFieldMethodParam']]/OBJBLOCK" + "/METHOD_DEF[./IDENT[@text='method']]/PARAMETERS/PARAMETER_DEF" + "/IDENT[@text='other']" ); diff --git a/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionIllegalCatchTest.java b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionIllegalCatchTest.java index 81f4151990a..75c5988f867 100644 --- a/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionIllegalCatchTest.java +++ b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionIllegalCatchTest.java @@ -40,7 +40,7 @@ protected String getCheckName() { @Test public void testOne() throws Exception { final File fileToProcess = - new File(getPath("SuppressionXpathRegressionIllegalCatchOne.java")); + new File(getPath("InputXpathIllegalCatchOne.java")); final DefaultConfiguration moduleConfig = createModuleConfig(IllegalCatchCheck.class); @@ -52,7 +52,7 @@ public void testOne() throws Exception { final List expectedXpathQueries = Collections.singletonList( "/COMPILATION_UNIT/CLASS_DEF" - + "[./IDENT[@text='SuppressionXpathRegressionIllegalCatchOne']]/OBJBLOCK" + + "[./IDENT[@text='InputXpathIllegalCatchOne']]/OBJBLOCK" + "/METHOD_DEF[./IDENT[@text='fun']]/SLIST" + "/LITERAL_TRY/LITERAL_CATCH" ); @@ -64,7 +64,7 @@ public void testOne() throws Exception { @Test public void testTwo() throws Exception { final File fileToProcess = - new File(getPath("SuppressionXpathRegressionIllegalCatchTwo.java")); + new File(getPath("InputXpathIllegalCatchTwo.java")); final DefaultConfiguration moduleConfig = createModuleConfig(IllegalCatchCheck.class); @@ -76,7 +76,7 @@ public void testTwo() throws Exception { final List expectedXpathQueries = Collections.singletonList( "/COMPILATION_UNIT/CLASS_DEF" - + "[./IDENT[@text='SuppressionXpathRegressionIllegalCatchTwo']]/OBJBLOCK" + + "[./IDENT[@text='InputXpathIllegalCatchTwo']]/OBJBLOCK" + "/METHOD_DEF[./IDENT[@text='methodTwo']]/SLIST" + "/LITERAL_TRY/LITERAL_CATCH" ); diff --git a/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionIllegalImportTest.java b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionIllegalImportTest.java index f7f8d9b787c..ac8e5490479 100644 --- a/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionIllegalImportTest.java +++ b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionIllegalImportTest.java @@ -38,9 +38,9 @@ protected String getCheckName() { } @Test - public void testOne() throws Exception { + public void testDefault() throws Exception { final File fileToProcess = - new File(getPath("SuppressionXpathRegressionIllegalImportOne.java")); + new File(getPath("InputXpathIllegalImportDefault.java")); final DefaultConfiguration moduleConfig = createModuleConfig(IllegalImportCheck.class); moduleConfig.addProperty("illegalPkgs", "java.util"); @@ -57,9 +57,9 @@ public void testOne() throws Exception { } @Test - public void testTwo() throws Exception { + public void testStatic() throws Exception { final File fileToProcess = - new File(getPath("SuppressionXpathRegressionIllegalImportTwo.java")); + new File(getPath("InputXpathIllegalImportStatic.java")); final DefaultConfiguration moduleConfig = createModuleConfig(IllegalImportCheck.class); diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceEnd.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceEnd.java similarity index 74% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceEnd.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceEnd.java index 6ac5e5a4c32..951c9a4b9b4 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceEnd.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceEnd.java @@ -2,7 +2,7 @@ import java.util.Collections; -public class SuppressionXpathRegressionGenericWhitespaceEnd { +public class InputXpathGenericWhitespaceEnd { void bad(Class cls) {//warn } void good(Class cls) { diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceNestedGenericsOne.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceNestedOne.java similarity index 74% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceNestedGenericsOne.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceNestedOne.java index a392d6dd912..6950860b8af 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceNestedGenericsOne.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceNestedOne.java @@ -2,7 +2,7 @@ import java.io.Serializable; -public class SuppressionXpathRegressionGenericWhitespaceNestedGenericsOne { +public class InputXpathGenericWhitespaceNestedOne { & Serializable> void bad() {//warn } & Serializable> void good() { diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceNestedGenericsThree.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceNestedThree.java similarity index 71% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceNestedGenericsThree.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceNestedThree.java index d6f8f921541..2438476eccd 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceNestedGenericsThree.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceNestedThree.java @@ -2,7 +2,7 @@ import java.io.Serializable; -public class SuppressionXpathRegressionGenericWhitespaceNestedGenericsThree { +public class InputXpathGenericWhitespaceNestedThree { , X> void bad() {//warn } , X> void good() { diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceNestedGenericsTwo.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceNestedTwo.java similarity index 74% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceNestedGenericsTwo.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceNestedTwo.java index 19e37368b33..f7b155f9ce9 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceNestedGenericsTwo.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceNestedTwo.java @@ -2,7 +2,7 @@ import java.io.Serializable; -public class SuppressionXpathRegressionGenericWhitespaceNestedGenericsTwo { +public class InputXpathGenericWhitespaceNestedTwo { & Serializable> void bad() {//warn } & Serializable> void good() { diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceSingleGenericOne.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceSingleOne.java similarity index 73% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceSingleGenericOne.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceSingleOne.java index 80a1a543c59..69859ea87b6 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceSingleGenericOne.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceSingleOne.java @@ -2,7 +2,7 @@ import java.util.Collections; -public class SuppressionXpathRegressionGenericWhitespaceSingleGenericOne { +public class InputXpathGenericWhitespaceSingleOne { Object bad = Collections. emptySet();//warn Object good = Collections.emptySet(); } diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceSingleGenericTwo.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceSingleTwo.java similarity index 67% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceSingleGenericTwo.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceSingleTwo.java index 33fbc9af078..2bf83017b4b 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceSingleGenericTwo.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceSingleTwo.java @@ -2,7 +2,7 @@ import java.io.Serializable; -public class SuppressionXpathRegressionGenericWhitespaceSingleGenericTwo { +public class InputXpathGenericWhitespaceSingleTwo { void bad() {//warn } void good() { diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceStartOne.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceStartOne.java similarity index 72% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceStartOne.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceStartOne.java index 5d18b475ff9..01865d2d7aa 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceStartOne.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceStartOne.java @@ -2,7 +2,7 @@ import java.util.Collections; -public class SuppressionXpathRegressionGenericWhitespaceStartOne { +public class InputXpathGenericWhitespaceStartOne { public void bad() {//warn } public void good() { diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceStartThree.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceStartThree.java similarity index 70% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceStartThree.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceStartThree.java index a2ebac7dedd..b6214eb4fc5 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceStartThree.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceStartThree.java @@ -2,7 +2,7 @@ import java.util.Collections; -public class SuppressionXpathRegressionGenericWhitespaceStartThree { +public class InputXpathGenericWhitespaceStartThree { < E> void bad() {//warn } void good() { diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceStartTwo.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceStartTwo.java similarity index 76% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceStartTwo.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceStartTwo.java index a216fdb85ef..ee0ce7f39bb 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/SuppressionXpathRegressionGenericWhitespaceStartTwo.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/genericwhitespace/InputXpathGenericWhitespaceStartTwo.java @@ -2,7 +2,7 @@ import java.util.function.Consumer; -public class SuppressionXpathRegressionGenericWhitespaceStartTwo { +public class InputXpathGenericWhitespaceStartTwo { public void bad(Consumer consumer) {//warn } public void good(Consumer consumer) { diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/SuppressionXpathRegressionHiddenFieldOne.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/InputXpathHiddenFieldLambdaExpInMethodCall.java similarity index 83% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/SuppressionXpathRegressionHiddenFieldOne.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/InputXpathHiddenFieldLambdaExpInMethodCall.java index 165a18b7e8a..1577c14246d 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/SuppressionXpathRegressionHiddenFieldOne.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/InputXpathHiddenFieldLambdaExpInMethodCall.java @@ -3,7 +3,7 @@ import java.util.Arrays; import java.util.List; -public class SuppressionXpathRegressionHiddenFieldOne { +public class InputXpathHiddenFieldLambdaExpInMethodCall { List numbers = Arrays.asList(1, 2, 3, 4, 5, 6); Integer value = Integer.valueOf(1); { diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/SuppressionXpathRegressionHiddenFieldTwo.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/InputXpathHiddenFieldMethodParam.java similarity index 79% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/SuppressionXpathRegressionHiddenFieldTwo.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/InputXpathHiddenFieldMethodParam.java index b5d4aed3a51..892405607b4 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/SuppressionXpathRegressionHiddenFieldTwo.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/hiddenfield/InputXpathHiddenFieldMethodParam.java @@ -1,6 +1,6 @@ package org.checkstyle.suppressionxpathfilter.hiddenfield; -public class SuppressionXpathRegressionHiddenFieldTwo { +public class InputXpathHiddenFieldMethodParam { static int someField; static Object other = null; Object field = null; diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/SuppressionXpathRegressionIllegalCatchOne.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/InputXpathIllegalCatchOne.java similarity index 74% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/SuppressionXpathRegressionIllegalCatchOne.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/InputXpathIllegalCatchOne.java index 7f39b3a5fac..14482345101 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/SuppressionXpathRegressionIllegalCatchOne.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/InputXpathIllegalCatchOne.java @@ -1,6 +1,6 @@ package org.checkstyle.suppressionxpathfilter.illegalcatch; -public class SuppressionXpathRegressionIllegalCatchOne { +public class InputXpathIllegalCatchOne { public void fun() { try { } catch (RuntimeException e) { // warn diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/SuppressionXpathRegressionIllegalCatchTwo.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/InputXpathIllegalCatchTwo.java similarity index 86% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/SuppressionXpathRegressionIllegalCatchTwo.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/InputXpathIllegalCatchTwo.java index 109e09b7dd7..f31c6d844d0 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/SuppressionXpathRegressionIllegalCatchTwo.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalcatch/InputXpathIllegalCatchTwo.java @@ -1,6 +1,6 @@ package org.checkstyle.suppressionxpathfilter.illegalcatch; -public class SuppressionXpathRegressionIllegalCatchTwo { +public class InputXpathIllegalCatchTwo { public void methodOne() { try { foo(); diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/SuppressionXpathRegressionIllegalImportOne.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/InputXpathIllegalImportDefault.java similarity index 62% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/SuppressionXpathRegressionIllegalImportOne.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/InputXpathIllegalImportDefault.java index 163fdbffc49..da8c6e2938a 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/SuppressionXpathRegressionIllegalImportOne.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/InputXpathIllegalImportDefault.java @@ -2,5 +2,5 @@ import java.util.List; // warn -public class SuppressionXpathRegressionIllegalImportOne { +public class InputXpathIllegalImportDefault { } diff --git a/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/SuppressionXpathRegressionIllegalImportTwo.java b/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/InputXpathIllegalImportStatic.java similarity index 64% rename from src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/SuppressionXpathRegressionIllegalImportTwo.java rename to src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/InputXpathIllegalImportStatic.java index 8f208c7d35d..6846efe69d2 100644 --- a/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/SuppressionXpathRegressionIllegalImportTwo.java +++ b/src/it/resources/org/checkstyle/suppressionxpathfilter/illegalimport/InputXpathIllegalImportStatic.java @@ -2,5 +2,5 @@ import static java.lang.Math.pow; // warn -public class SuppressionXpathRegressionIllegalImportTwo { +public class InputXpathIllegalImportStatic { } diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/internal/XpathRegressionTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/internal/XpathRegressionTest.java index 5ad5cf1118c..11b855212a2 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/internal/XpathRegressionTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/internal/XpathRegressionTest.java @@ -138,10 +138,6 @@ public class XpathRegressionTest extends AbstractModuleTestSupport { "FinalClass", "FinalLocalVariable", "FinalParameters", - "GenericWhitespace", - "HiddenField", - "IllegalCatch", - "IllegalImport", "IllegalThrows", "IllegalToken", "IllegalTokenText",