Skip to content

Resolve error-prone violations #18599

@romani

Description

@romani

continuation of #17988

in logs of execution there was WARNs, log:

[INFO] --- compiler:3.14.1:compile (error-prone-compile) @ checkstyle ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 473 source files with javac [debug release 21] to target/classes
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/LineColumn.java:[88,30] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean 'return (line == lineColumn.line)'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/LineColumn.java:[89,34] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean '&& (column == lineColumn.column);'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java:[367,30] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean 'return (lineNo == violation.lineNo)'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java:[368,34] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean '&& (columnNo == violation.columnNo)'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java:[369,34] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean '&& (columnCharIndex == violation.columnCharIndex)'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java:[370,34] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean '&& (tokenType == violation.tokenType)'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java:[375,38] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java:[428,38] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DefaultConfiguration.java:[144,17] [InlineMeSuggester] This deprecated API looks inlineable. If you'd like the body of the API to be automatically inlined to its callers, please annotate it with @InlineMe. NOTE: the suggested fix makes the method final if it was not already.
    (see https://errorprone.info/bugpattern/InlineMeSuggester)
  Did you mean '@InlineMe(replacement = "this.addProperty(attributeName, value)")'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java:[218,13] [LoopOverCharArray] toCharArray allocates a new array, using charAt is more efficient
    (see https://errorprone.info/bugpattern/LoopOverCharArray)
  Did you mean 'for (int i = 0; i < text.length(); i++) { char letter = text.charAt(i);if (Character.isUpperCase(letter)) {'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java:[270,58] [InvalidParam] `fullModuleName` is very close to the parameter `fullModuleNames`. Did you mean to reference the parameter?
    (see https://errorprone.info/bugpattern/InvalidParam)
  Did you mean '* In most case, there should be only one element in {@code fullModuleNames}, otherwise'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java:[275,67] [InvalidParam] `fullModuleName` is very close to the parameter `fullModuleNames`. Did you mean to reference the parameter?
    (see https://errorprone.info/bugpattern/InvalidParam)
  Did you mean '* @return instance of module if there is only one element in {@code fullModuleNames}'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java:[277,24] [InvalidParam] `fullModuleName` is very close to the parameter `fullModuleNames`. Did you mean to reference the parameter?
    (see https://errorprone.info/bugpattern/InvalidParam)
  Did you mean '*      element in {@code fullModuleNames}'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[204,22] [InvalidInlineTag] This tag is invalid.
    (see https://errorprone.info/bugpattern/InvalidInlineTag)
  Did you mean '* <pre>{@code * {@code value} The parameter of method.}</pre>'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[618,13] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[620,10] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[661,15] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[666,22] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[683,15] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[692,22] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[723,15] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[732,22] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[1062,13] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[1063,10] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[1099,34] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[1138,13] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[1135,20] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[1171,13] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[1163,15] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[1167,8] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[1194,13] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[1190,8] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[1220,8] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[1258,13] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocCommentsTokenTypes.java:[1255,20] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/LineSeparatorOption.java:[51,26] [ImmutableEnumChecker] enums should be immutable: 'LineSeparatorOption' has field 'lineSeparator' of type 'byte[]', arrays are mutable
    (see https://errorprone.info/bugpattern/ImmutableEnumChecker)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/OrderedPropertiesCheck.java:[53,6] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/OrderedPropertiesCheck.java:[212,36] [UnsynchronizedOverridesSynchronized] Unsynchronized method keys overrides synchronized method in Hashtable
    (see https://errorprone.info/bugpattern/UnsynchronizedOverridesSynchronized)
  Did you mean 'public synchronized Enumeration<Object> keys() {'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleCheck.java:[295,51] [MalformedInlineTag] The correct syntax to open this inline tag is {@link.
    (see https://errorprone.info/bugpattern/MalformedInlineTag)
  Did you mean '* Retrieves an {@link Enum Enum} type from a {@link String String}.'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AvoidDoubleBraceInitializationCheck.java:[77,47] [UnnecessaryLambda] Returning a lambda from a helper method or saving it in a constant is unnecessary; prefer to implement the functional interface method directly and use a method reference instead.
    (see https://errorprone.info/bugpattern/UnnecessaryLambda)
  Did you mean 'private static  boolean hasMembers(DetailAST token){return !IGNORED_TYPES.get(token.getType());}'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/MultiFileRegexpHeaderCheck.java:[97,20] [UnusedVariable] The field 'headerFiles' is never read.
    (see https://errorprone.info/bugpattern/UnusedVariable)
  Did you mean to remove this line?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheck.java:[74,56] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheck.java:[73,19] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTagInfo.java:[84,15] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTagInfo.java:[156,15] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTagInfo.java:[170,15] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTagInfo.java:[522,15] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CommentsIndentationCheck.java:[841,8] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CommentsIndentationCheck.java:[918,8] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocBlockTagLocationCheck.java:[55,40] [UnrecognisedJavadocTag] This Javadoc tag wasn't recognised by the parser. Is it malformed somehow, perhaps with mismatched braces?
    (see https://errorprone.info/bugpattern/UnrecognisedJavadocTag)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/RequireEmptyLineBeforeBlockTagGroupCheck.java:[135,37] [InvalidInlineTag] This tag is invalid.
    (see https://errorprone.info/bugpattern/InvalidInlineTag)
  Did you mean '* |--JAVADOC_BLOCK_TAG[4x3] : [{@code T} The bar.\n ]'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/RequireEmptyLineBeforeBlockTagGroupCheck.java:[142,37] [InvalidInlineTag] This tag is invalid.
    (see https://errorprone.info/bugpattern/InvalidInlineTag)
  Did you mean '* |--JAVADOC_BLOCK_TAG[4x3] : [{@code T} The bar.\n ]'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/RequireEmptyLineBeforeBlockTagGroupCheck.java:[151,37] [InvalidInlineTag] This tag is invalid.
    (see https://errorprone.info/bugpattern/InvalidInlineTag)
  Did you mean '* |--JAVADOC_BLOCK_TAG[4x3] : [{@code noSpace} there is no space here\n ]'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java:[370,9] [LoopOverCharArray] toCharArray allocates a new array, using charAt is more efficient
    (see https://errorprone.info/bugpattern/LoopOverCharArray)
  Did you mean 'for (int i = 0; i < text.length(); i++) { char letter = text.charAt(i);final char print;'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/BooleanExpressionComplexityCheck.java:[33,47] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/BooleanExpressionComplexityCheck.java:[34,4] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/BooleanExpressionComplexityCheck.java:[43,28] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/BooleanExpressionComplexityCheck.java:[46,55] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/BooleanExpressionComplexityCheck.java:[50,14] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/CyclomaticComplexityCheck.java:[52,15] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java:[54,5] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java:[201,37] [InconsistentCapitalization] Found the field 'checkCPP' with the same name as the parameter 'checkCpp' but with different capitalization.
    (see https://errorprone.info/bugpattern/InconsistentCapitalization)
  Did you mean 'public void setCheckCPP(boolean checkCPP) {'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java:[86,52] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java:[206,61] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java:[421,34] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean 'return (firstLine == tag.firstLine)'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java:[422,38] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean '&& (lastLine == tag.lastLine)'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java:[374,34] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean 'return (lineNo == suppression.lineNo)'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java:[63,5] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java:[225,37] [InconsistentCapitalization] Found the field 'checkCPP' with the same name as the parameter 'checkCpp' but with different capitalization.
    (see https://errorprone.info/bugpattern/InconsistentCapitalization)
  Did you mean 'public void setCheckCPP(boolean checkCPP) {'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java:[114,52] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java:[230,61] [EscapedEntity] HTML entities in @code/@literal tags will appear literally in the rendered javadoc.
    (see https://errorprone.info/bugpattern/EscapedEntity)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java:[508,34] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean 'return (line == tag.line)'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java:[509,38] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean '&& (column == tag.column)'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/site/ParentModuleMacro.java:[41,20] [PatternMatchingInstanceof] This code can be simplified to use a pattern-matching instanceof.
    (see https://errorprone.info/bugpattern/PatternMatchingInstanceof)
  Did you mean 'if (!(sink instanceof XdocSink xdocSink)) {'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/site/PropertiesMacro.java:[95,20] [PatternMatchingInstanceof] This code can be simplified to use a pattern-matching instanceof.
    (see https://errorprone.info/bugpattern/PatternMatchingInstanceof)
  Did you mean 'if (!(sink instanceof XdocSink xdocSink)) {'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/site/SiteUtil.java:[774,37] [NullableOptional] Using an Optional variable which is expected to possibly be null is discouraged. It is best to indicate the absence of the value by assigning it an empty optional.
    (see https://errorprone.info/bugpattern/NullableOptional)
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/site/ViolationMessagesMacro.java:[40,20] [PatternMatchingInstanceof] This code can be simplified to use a pattern-matching instanceof.
    (see https://errorprone.info/bugpattern/PatternMatchingInstanceof)
  Did you mean 'if (!(sink instanceof XdocSink xdocSink)) {'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/ParserUtil.java:[128,9] [LoopOverCharArray] toCharArray allocates a new array, using charAt is more efficient
    (see https://errorprone.info/bugpattern/LoopOverCharArray)
  Did you mean 'for (int i = 0; i < text.length(); i++) { char c = text.charAt(i);if (c == '\n') {'?

we need to register all error-prone rules in our config as WARN and in scope of this isuse convert them to OFF or ERROR.

error-prone config:

checkstyle/pom.xml

Lines 239 to 241 in df31a58

<error-prone.configuration-args>
-Xep:AmbiguousJsonCreator:ERROR
-Xep:AssertJNullnessAssertion:ERROR

Attention: some rule might need to be off , if you are not sure, ask before doing update.

After fixing all, can we update error-prone config to fail build on WARNs ? in this case on version bump we will be forced to fix all new violation (ERRORs, WARNs) or marking them OFF. So there will be no more surprise list of warnings.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions