Resolve violations from spotbugs sb-contrib 7.6.0
we need to remove suppression that we introduced at #12855
PLEASE do not resolve all violations by one PullRequest, fix by groups as some violation might stay in permanent suppression
$ mvn spotbugs:check
......
[INFO] --- spotbugs-maven-plugin:4.7.3.0:check (default-cli) @ checkstyle ---
[INFO] BugInstance size is 6
[INFO] Error size is 0
[INFO] Total bugs: 6
[ERROR] Medium: Method com.puppycrawl.tools.checkstyle.ConfigurationLoader
$InternalLoader.endElement(String, String, String)
sets an enum reference to null
[com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader]
At ConfigurationLoader.java:[line 571] ENMI_NULL_ENUM_VALUE
[ERROR] Medium: Enum class com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTagInfo
only declares one enum value
[com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTagInfo]
At JavadocTagInfo.java:[line 389] ENMI_ONE_ENUM_VALUE
[ERROR] Medium: Method call in
com.puppycrawl.tools.checkstyle.gui.ParseTreeTableModel.setParseTree(DetailAST)
passes object that the method is called on as a parameter
[com.puppycrawl.tools.checkstyle.gui.ParseTreeTableModel]
At ParseTreeTableModel.java:[line 65] SPP_PASSING_THIS_AS_PARM
[ERROR] Medium: Method
com.puppycrawl.tools.checkstyle.utils.CheckUtil.getSurroundingAccessModifier(DetailAST)
sets an enum reference to null
[com.puppycrawl.tools.checkstyle.utils.CheckUtil]
At CheckUtil.java:[line 492] ENMI_NULL_ENUM_VALUE
[ERROR] Medium: Method
com.puppycrawl.tools.checkstyle.utils.ScopeUtil.getDeclaredScopeFromMods(DetailAST)
sets an enum reference to null
[com.puppycrawl.tools.checkstyle.utils.ScopeUtil]
At ScopeUtil.java:[line 46] ENMI_NULL_ENUM_VALUE
[ERROR] Medium: Method
com.puppycrawl.tools.checkstyle.utils.ScopeUtil.getSurroundingScope(DetailAST)
sets an enum reference to null
[com.puppycrawl.tools.checkstyle.utils.ScopeUtil]
At ScopeUtil.java:[line 133] ENMI_NULL_ENUM_VALUE
and controversial, read mebigfatguy/fb-contrib#405, but lets discuss it may be some of them need to be fixed and we can suppress by message that contains stack all others:
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader.configStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader] In ConfigurationLoader.java CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable stack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.JavadocDetailNodeParser] At JavadocDetailNodeParser.java:[line 488] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.PackageNamesLoader.packageStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.PackageNamesLoader] In PackageNamesLoader.java CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.checks.coding.AbstractSuperCheck.methodStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.AbstractSuperCheck] In AbstractSuperCheck.java CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable stack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.DeclarationOrderCheck] At DeclarationOrderCheck.java:[line 431] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.checks.coding.FinalLocalVariableCheck.scopeStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.FinalLocalVariableCheck] In FinalLocalVariableCheck.java CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.checks.coding.ModifiedControlVariableCheck.variableStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.ModifiedControlVariableCheck] In ModifiedControlVariableCheck.java CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.checks.coding.ParameterAssignmentCheck.parameterNamesStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.ParameterAssignmentCheck] In ParameterAssignmentCheck.java CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable frameStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck] At RequireThisCheck.java:[line 382] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable frameStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck] At RequireThisCheck.java:[line 556] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable frameStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck] At RequireThisCheck.java:[line 658] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable frameStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck] At RequireThisCheck.java:[line 676] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable stack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck] At RequireThisCheck.java:[line 1002] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable stack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck] At RequireThisCheck.java:[line 1034] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable stack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck] At RequireThisCheck.java:[line 1067] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.checks.coding.ReturnCountCheck.contextStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.ReturnCountCheck] In ReturnCountCheck.java CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable instAndClassVarDeque is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck] At UnusedLocalVariableCheck.java:[line 578] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable variablesStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck] At UnusedLocalVariableCheck.java:[line 330] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable variablesStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck] At UnusedLocalVariableCheck.java:[line 353] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable variablesStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck] At UnusedLocalVariableCheck.java:[line 424] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable variablesStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck] At UnusedLocalVariableCheck.java:[line 487] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable variablesStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck] At UnusedLocalVariableCheck.java:[line 574] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable variablesStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck] At UnusedLocalVariableCheck.java:[line 678] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable variablesStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck] At UnusedLocalVariableCheck.java:[line 699] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable variablesStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck] At UnusedLocalVariableCheck.java:[line 723] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable variablesStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck] At UnusedLocalVariableCheck.java:[line 749] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck$TypeDeclDesc.instanceAndClassVarStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck$TypeDeclDesc] In UnusedLocalVariableCheck.java CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable instAndClassVarDeque is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck$TypeDeclDesc] At UnusedLocalVariableCheck.java:[line 1033] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable instAndClassVarDeque is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck$TypeDeclDesc] At UnusedLocalVariableCheck.java:[line 1034] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.checks.design.MutableExceptionCheck.checkingStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.design.MutableExceptionCheck] In MutableExceptionCheck.java CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.checks.imports.ImportControlLoader.stack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.imports.ImportControlLoader] In ImportControlLoader.java CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable stack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.indentation.CommentsIndentationCheck] At CommentsIndentationCheck.java:[line 766] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable htmlStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck] At JavadocStyleCheck.java:[line 591] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable htmlStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck] At JavadocStyleCheck.java:[line 655] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable htmlStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck] At JavadocStyleCheck.java:[line 719] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.checks.metrics.BooleanExpressionComplexityCheck.contextStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.metrics.BooleanExpressionComplexityCheck] In BooleanExpressionComplexityCheck.java CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.checks.metrics.CyclomaticComplexityCheck.valueStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.metrics.CyclomaticComplexityCheck] In CyclomaticComplexityCheck.java CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.checks.sizes.ExecutableStatementCountCheck.contextStack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.checks.sizes.ExecutableStatementCountCheck] In ExecutableStatementCountCheck.java CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable stack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.meta.JavadocMetadataScraper] At JavadocMetadataScraper.java:[line 386] CNC_COLLECTION_NAMING_CONFUSION
[ERROR] Medium: Collection variable com.puppycrawl.tools.checkstyle.xpath.iterators.ReverseDescendantIterator.stack is named with a different type of collection in the name [com.puppycrawl.tools.checkstyle.xpath.iterators.ReverseDescendantIterator] In ReverseDescendantIterator.java CNC_COLLECTION_NAMING_CONFUSION
Resolve violations from spotbugs sb-contrib 7.6.0
we need to remove suppression that we introduced at #12855
PLEASE do not resolve all violations by one PullRequest, fix by groups as some violation might stay in permanent suppression
and controversial, read mebigfatguy/fb-contrib#405, but lets discuss it may be some of them need to be fixed and we can suppress by message that contains
stackall others: