each rule should be in separate PR.
Source File: "AbbreviationAsWordInNameCheck.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "final List<DetailAST> result = new LinkedList<>();"
Line Number: 436
Source File: "AbstractImportControl.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "private final Deque<AbstractImportRule> rules = new LinkedList<>();"
Line Number: 33
Source File: "AbstractSuperCheck.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "private final Deque<MethodNode> methodStack = new LinkedList<>();"
Line Number: 48
Source File: "ConfigurationLoader.java"
Bug Pattern: "InlineFormatString"
Description: "Prefer to create format strings inline, instead of extracting them to a single-use constant"
Line Contents: "private static final String SAX_PARSE_EXCEPTION_FORMAT = "%s - %s:%s:%s";"
Line Number: 78
Source File: "CsvFilterElement.java"
Bug Pattern: "EqualsGetClass"
Description: "Prefer instanceof to getClass when implementing Object#equals."
Line Contents: "public boolean equals(Object object) {"
Line Number: 105
Source File: "CustomImportOrderCheck.java"
Bug Pattern: "StringSplitter"
Description: "String.split(String) has surprising behavior"
Line Contents: "final String[] import1Tokens = import1.split(separator);"
Line Number: 654
Source File: "CustomImportOrderCheck.java"
Bug Pattern: "StringSplitter"
Description: "String.split(String) has surprising behavior"
Line Contents: "final String[] import2Tokens = import2.split(separator);"
Line Number: 655
Source File: "DescendantIterator.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "private final Queue<NodeInfo> queue = new LinkedList<>();"
Line Number: 48
Source File: "EmptyCatchBlockCheck.java"
Bug Pattern: "StringSplitter"
Description: "String.split(String) has surprising behavior"
Line Contents: "final String[] lines = LINE_END_PATTERN.split(commentContent);"
Line Number: 155
Source File: "EmptyLineSeparatorCheck.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "final List<DetailAST> childNodes = new LinkedList<>();"
Line Number: 502
Source File: "InlineTagUtil.java"
Bug Pattern: "StringSplitter"
Description: "String.split(String) has surprising behavior"
Line Contents: "final String[] precedingLines = NEWLINE_PATTERN.split(precedingText);"
Line Number: 126
Source File: "JavadocPropertiesGenerator.java"
Bug Pattern: "StatementSwitchToExpressionSwitch"
Description: "This statement switch can be converted to a new-style arrow switch"
Line Contents: "switch (node.getType()) {"
Line Number: 279
Source File: "JavadocTypeCheck.java"
Bug Pattern: "StringSplitter"
Description: "String.split(String) has surprising behavior"
Line Contents: "TYPE_NAME_IN_JAVADOC_TAG_SPLITTER.split(tag.getFirstArg())[0];"
Line Number: 405
Source File: "JavadocTypeCheck.java"
Bug Pattern: "StringSplitter"
Description: "String.split(String) has surprising behavior"
Line Contents: "typeParamName = TYPE_NAME_IN_JAVADOC_TAG_SPLITTER.split(tag.getFirstArg())[0];"
Line Number: 430
Source File: "LineColumn.java"
Bug Pattern: "EqualsGetClass"
Description: "Prefer instanceof to getClass when implementing Object#equals."
Line Contents: "public boolean equals(Object other) {"
Line Number: 78
Source File: "Main.java"
Bug Pattern: "InlineFormatString"
Description: "Prefer to create format strings inline, instead of extracting them to a single-use constant"
Line Contents: "final String msg = "Could not find config XML file '%s'.";"
Line Number: 878
Source File: "Main.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "final List<File> result = new LinkedList<>();"
Line Number: 220
Source File: "ModifiedControlVariableCheck.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "final List<DetailAST> foundExpressions = new LinkedList<>();"
Line Number: 400
Source File: "ModifiedControlVariableCheck.java"
Bug Pattern: "StatementSwitchToExpressionSwitch"
Description: "This statement switch can be converted to a new-style arrow switch"
Line Contents: "switch (ast.getType()) {"
Line Number: 164
Source File: "ModuleJavadocParsingUtil.java"
Bug Pattern: "StringSplitter"
Description: "String.split(String) has surprising behavior"
Line Contents: "final String[] javadocPortionLinesSplit = javadocPortion.split(NEWLINE"
Line Number: 109
Source File: "PropertiesMacro.java"
Bug Pattern: "InlineFormatString"
Description: "Prefer to create format strings inline, instead of extracting them to a single-use constant"
Line Contents: "private static final String URL_F = "%s#%s";"
Line Number: 72
Source File: "PropertiesMacro.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "final List<String> orderProperties = new LinkedList<>(properties);"
Line Number: 222
Source File: "RedundantModifierCheck.java"
Bug Pattern: "StatementSwitchToExpressionSwitch"
Description: "This statement switch can be converted to a new-style arrow switch"
Line Contents: "switch (ast.getType()) {"
Line Number: 257
Source File: "RequireThisCheck.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "final Deque<AbstractFrame> frameStack = new LinkedList<>();"
Line Number: 207
Source File: "ReturnCountCheck.java"
Bug Pattern: "StatementSwitchToExpressionSwitch"
Description: "This statement switch can be converted to a new-style arrow switch"
Line Contents: "switch (ast.getType()) {"
Line Number: 161
Source File: "ReverseDescendantIterator.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "private final Deque<NodeInfo> stack = new LinkedList<>();"
Line Number: 43
Source File: "ReverseDescendantIterator.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "private final Queue<NodeInfo> queue = new LinkedList<>();"
Line Number: 39
Source File: "SummaryJavadocCheck.java"
Bug Pattern: "StatementSwitchToExpressionSwitch"
Description: "This statement switch can be converted to a new-style arrow switch"
Line Contents: "switch (currentAst.getType()) {"
Line Number: 211
Source File: "SuppressFilterElement.java"
Bug Pattern: "EqualsGetClass"
Description: "Prefer instanceof to getClass when implementing Object#equals."
Line Contents: "public boolean equals(Object other) {"
Line Number: 187
Source File: "SuppressWarningsHolder.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "ThreadLocal.withInitial(LinkedList::new);"
Line Number: 83
Source File: "SuppressWarningsHolder.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "final List<String> valueList = new LinkedList<>();"
Line Number: 488
Source File: "SuppressWarningsHolder.java"
Bug Pattern: "StatementSwitchToExpressionSwitch"
Description: "This statement switch can be converted to a new-style arrow switch"
Line Contents: "switch (nextType) {"
Line Number: 354
Source File: "SuppressionXpathFilter.java"
Bug Pattern: "EqualsGetClass"
Description: "Prefer instanceof to getClass when implementing Object#equals."
Line Contents: "public boolean equals(Object obj) {"
Line Number: 278
Source File: "TagParser.java"
Bug Pattern: "JdkObsolete"
Description: "It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not."
Line Contents: "private final List<HtmlTag> tags = new LinkedList<>();"
Line Number: 49
Source File: "TodoCommentCheck.java"
Bug Pattern: "StringSplitter"
Description: "String.split(String) has surprising behavior"
Line Contents: "final String[] lines = ast.getText().split("\n");"
Line Number: 93
Source File: "TokenUtil.java"
Bug Pattern: "InlineFormatString"
Description: "Prefer to create format strings inline, instead of extracting them to a single-use constant"
Line Contents: "private static final String TOKEN_ID_EXCEPTION_FORMAT = "unknown TokenTypes id '%s'";"
Line Number: 54
Source File: "TranslationCheck.java"
Bug Pattern: "InlineFormatString"
Description: "Prefer to create format strings inline, instead of extracting them to a single-use constant"
Line Contents: "private static final String DEFAULT_TRANSLATION_FILE_NAME_FORMATTER = "%s.%s";"
Line Number: 147
Source File: "TranslationCheck.java"
Bug Pattern: "InlineFormatString"
Description: "Prefer to create format strings inline, instead of extracting them to a single-use constant"
Line Contents: "private static final String FILE_NAME_WITH_LANGUAGE_CODE_FORMATTER = "%s_%s.%s";"
Line Number: 149
Source File: "TranslationCheck.java"
Bug Pattern: "InlineFormatString"
Description: "Prefer to create format strings inline, instead of extracting them to a single-use constant"
Line Contents: "private static final String REGEXP_FORMAT_TO_CHECK_DEFAULT_TRANSLATIONS = "^%s\\.%s$";"
Line Number: 155
Source File: "TranslationCheck.java"
Bug Pattern: "InlineFormatString"
Description: "Prefer to create format strings inline, instead of extracting them to a single-use constant"
Line Contents: "private static final String REGEXP_FORMAT_TO_CHECK_REQUIRED_TRANSLATIONS ="
Line Number: 152
Source File: "XMLLogger.java"
Bug Pattern: "StatementSwitchToExpressionSwitch"
Description: "This statement switch can be converted to a new-style arrow switch"
Line Contents: "switch (chr) {"
Line Number: 265
Source File: "XpathFilterElement.java"
Bug Pattern: "EqualsGetClass"
Description: "Prefer instanceof to getClass when implementing Object#equals."
Line Contents: "public boolean equals(Object other) {"
Line Number: 218
Each Bug Pattern should be fixed and tested in individual PR after fixing mark WARN as ERROR
Solve FormatStringShouldUsePlaceholders error-prone violations from test area of code.
Follow up of #17845
task is convert WARN to ERROR and fix all violations
checkstyle/pom.xml
Lines 276 to 282 in 2a5ed2f
each rule should be in separate PR.
Some old list problems:
Each Bug Pattern should be fixed and tested in individual PR after fixing mark WARN as ERROR
Solve FormatStringShouldUsePlaceholders error-prone violations from test area of code.