From 6335dd84f14a40150e7eb7a037f9a20e5f189236 Mon Sep 17 00:00:00 2001 From: Vyom-Yadav Date: Sat, 17 Sep 2022 19:49:07 +0530 Subject: [PATCH] Issue #12164: Enable Checker Framework --- ...arterRuleSet-AllRulesByCategory.groovy.txt | 3 - ...ecker-framework-formatter-suppressions.xml | 37 + .../checker-framework-index-suppressions.xml | 3011 ++++++++ ...r-framework-lock-tainting-suppressions.xml | 1194 ++++ ...rk-methods-resource-fenum-suppressions.xml | 344 + ...llness-optional-interning-suppressions.xml | 6090 +++++++++++++++++ ...work-purity-value-returns-suppressions.xml | 61 + ...erty-key-compiler-message-suppressions.xml | 717 ++ ...-signature-gui-units-init-suppressions.xml | 1062 +++ .ci/checker-framework.groovy | 476 ++ .ci/jsoref-spellchecker/exclude.pl | 1 + .ci/jsoref-spellchecker/whitelist.words | 15 + .github/workflows/checker-framework.yml | 37 + ...checkstyle_non_main_files_suppressions.xml | 3 + pom.xml | 490 +- 15 files changed, 13535 insertions(+), 6 deletions(-) create mode 100644 .ci/checker-framework-suppressions/checker-framework-formatter-suppressions.xml create mode 100644 .ci/checker-framework-suppressions/checker-framework-index-suppressions.xml create mode 100644 .ci/checker-framework-suppressions/checker-framework-lock-tainting-suppressions.xml create mode 100644 .ci/checker-framework-suppressions/checker-framework-methods-resource-fenum-suppressions.xml create mode 100644 .ci/checker-framework-suppressions/checker-framework-nullness-optional-interning-suppressions.xml create mode 100644 .ci/checker-framework-suppressions/checker-framework-purity-value-returns-suppressions.xml create mode 100644 .ci/checker-framework-suppressions/checker-framework-regex-property-key-compiler-message-suppressions.xml create mode 100644 .ci/checker-framework-suppressions/checker-framework-signature-gui-units-init-suppressions.xml create mode 100644 .ci/checker-framework.groovy create mode 100644 .github/workflows/checker-framework.yml diff --git a/.ci/StarterRuleSet-AllRulesByCategory.groovy.txt b/.ci/StarterRuleSet-AllRulesByCategory.groovy.txt index 8b8982bb2a6..74751b78fcd 100644 --- a/.ci/StarterRuleSet-AllRulesByCategory.groovy.txt +++ b/.ci/StarterRuleSet-AllRulesByCategory.groovy.txt @@ -359,9 +359,6 @@ ruleset { NonFinalSubclassOfSensitiveInterface ObjectFinalize PublicFinalizeMethod - SystemExit { - doNotApplyToFileNames = 'pitest-survival-check-xml.groovy,error-prone-check.groovy' - } UnsafeArrayDeclaration // rulesets/serialization.xml diff --git a/.ci/checker-framework-suppressions/checker-framework-formatter-suppressions.xml b/.ci/checker-framework-suppressions/checker-framework-formatter-suppressions.xml new file mode 100644 index 00000000000..0e97f318998 --- /dev/null +++ b/.ci/checker-framework-suppressions/checker-framework-formatter-suppressions.xml @@ -0,0 +1,37 @@ + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java + i18nformat.key.not.found + a key doesn't exist in the provided translation file + final String pattern = resourceBundle.getString(key); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + i18nformat.key.not.found + a key doesn't exist in the provided translation file + final String pattern = resourceBundle.getString(key); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/JavadocMetadataScraper.java + format.string + invalid format string (is a @Format annotation missing?) + Locale.ROOT, PROP_DEFAULT_VALUE_MISSING, propertyName) + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/JavadocMetadataScraper.java + format.string + invalid format string (is a @Format annotation missing?) + Locale.ROOT, PROP_TYPE_MISSING, propertyName) + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/TokenUtil.java + i18nformat.key.not.found + a key doesn't exist in the provided translation file + return bundle.getString(name); + + diff --git a/.ci/checker-framework-suppressions/checker-framework-index-suppressions.xml b/.ci/checker-framework-suppressions/checker-framework-index-suppressions.xml new file mode 100644 index 00000000000..c736518aa0a --- /dev/null +++ b/.ci/checker-framework-suppressions/checker-framework-index-suppressions.xml @@ -0,0 +1,3011 @@ + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/AstTreeStringPrinter.java + argument + incompatible argument for parameter endIndex of substring. + baseIndentation = baseIndentation.substring(0, baseIndentation.length() - 2); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/AuditEventDefaultFormatter.java + argument + incompatible argument for parameter capacity of StringBuilder. + final StringBuilder sb = new StringBuilder(bufLen); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + argument + incompatible argument for parameter bitIndex of get. + return getBranchTokenTypes().get(tokenType); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + argument + incompatible argument for parameter bitIndex of set. + branchTokenTypes.set(type); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + argument + incompatible argument for parameter endIndex of substring. + return className.substring(0, className.length() - contextLength); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + final String ruleName = recognizer.getRuleNames()[ruleIndex]; +
+ found : int + required: @IndexFor("recognizer.getRuleNames()") or @LTLengthOf("recognizer.getRuleNames()") -- an integer less than recognizer.getRuleNames()'s length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + array.access.unsafe.high.range + Potentially unsafe array access: the index could be larger than the array's bound + children[i] = child; +
+ index type found: @IntRange(from=-2147483648) int + array type found: DetailNode [] + required : index of type @IndexFor("children") or @LTLengthOf("children"), or array of type @MinLen(-9223372036854775808) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + final String ruleName = recognizer.getRuleNames()[ruleIndex]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + array.length.negative + Variable used in array creation could be negative. + new JavadocNodeImpl[parseTreeNode.getChildCount()]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + array.length.negative + Variable used in array creation could be negative. + node.setChildren(new JavadocNodeImpl[parseTree.getChildCount()]); +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java + argument + incompatible argument for parameter beginIndex of substring. + ent.substring(prefixLength, ent.length() - 1), radix); +
+ found : int + required: @LTEqLengthOf("ent") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java + argument + incompatible argument for parameter beginIndex of substring. + final String name = ent.substring(1, ent.length() - 1); +
+ found : @UpperBoundLiteral(1) int + required: @LTEqLengthOf("ent") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java + argument + incompatible argument for parameter endIndex of substring. + ent.substring(prefixLength, ent.length() - 1), radix); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java + argument + incompatible argument for parameter endIndex of substring. + final String name = ent.substring(1, ent.length() - 1); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java + argument + incompatible argument for parameter index of charAt. + if (ent.charAt(0) == '&' && CommonUtil.endsWithChar(ent, ';')) { +
+ found : @UpperBoundLiteral(0) int + required: @LTLengthOf("ent") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java + argument + incompatible argument for parameter index of charAt. + if (ent.charAt(1) == '#') { +
+ found : @UpperBoundLiteral(1) int + required: @LTLengthOf("ent") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java + argument + incompatible argument for parameter index of charAt. + if (ent.charAt(2) == 'x') { +
+ found : @UpperBoundLiteral(2) int + required: @LTLengthOf("ent") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + getLines()[ast.getLineNo() - 1], ast.getColumnNo(), tabWidth); +
+ found : int + required: @IndexFor("this.getLines()") or @LTLengthOf("this.getLines()") -- an integer less than this.getLines()'s length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + getLines()[lineNo - 1], colNo, tabWidth); +
+ found : int + required: @IndexFor("this.getLines()") or @LTLengthOf("this.getLines()") -- an integer less than this.getLines()'s length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + getLines()[ast.getLineNo() - 1], ast.getColumnNo(), tabWidth); +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + getLines()[lineNo - 1], colNo, tabWidth); +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + argument + incompatible argument for parameter beginIndex of substring. + final String[] txt = {line.substring(startColNo)}; +
+ found : int + required: @LTEqLengthOf("line") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + argument + incompatible argument for parameter beginIndex of substring. + final String[] txt = {line.substring(startColNo)}; +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + argument + incompatible argument for parameter beginIndex of substring. + returnValue[0] = line(startLineNo - 1).substring(startColNo); +
+ found : int + required: @LTEqLengthOf("this.line(startLineNo - 1)") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + argument + incompatible argument for parameter beginIndex of substring. + returnValue[0] = line(startLineNo - 1).substring(startColNo); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + argument + incompatible argument for parameter beginIndex of substring. + returnValue[0] = line(startLineNo - 1).substring(startColNo, +
+ found : int + required: @LTEqLengthOf("this.line(startLineNo - 1)") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + argument + incompatible argument for parameter beginIndex of substring. + returnValue[0] = line(startLineNo - 1).substring(startColNo, +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + argument + incompatible argument for parameter endIndex of substring. + endColNo + 1); +
+ found : int + required: @LTEqLengthOf("this.line(endLineNo - 1)") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + argument + incompatible argument for parameter endIndex of substring. + endColNo + 1); +
+ found : int + required: @LTEqLengthOf("this.line(startLineNo - 1)") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + argument + incompatible argument for parameter endIndex of substring. + endColNo + 1); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + returnValue[i - startLineNo + 1] = line(i); +
+ found : int + required: @IndexFor("returnValue") or @LTLengthOf("returnValue") -- an integer less than returnValue's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + returnValue[0] = line(startLineNo - 1).substring(startColNo); +
+ found : String [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + returnValue[i - startLineNo + 1] = line(i); +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + returnValue[returnValue.length - 1] = line(endLineNo - 1).substring(0, +
+ found : @GTENegativeOne int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + array.length.negative + Variable used in array creation could be negative. + returnValue = new String[endLineNo - startLineNo + 1]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + final int startOfLine = lineBreakPositions[lineNo]; +
+ found : int + required: @IndexFor("lineBreakPositions") or @LTLengthOf("lineBreakPositions") -- an integer less than lineBreakPositions's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + return lines[lineNo]; +
+ found : int + required: @IndexFor("this.lines") or @LTLengthOf("this.lines") -- an integer less than this.lines's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + lineBreakPositions[0] = 0; +
+ found : int [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + array.access.unsafe.high.range + Potentially unsafe array access: the index could be larger than the array's bound + lineBreakPositions[lineNo] = matcher.end(); +
+ index type found: @IntRange(from=-2147483648) int + array type found: int [] + required : index of type @IndexFor("lineBreakPositions") or @LTLengthOf("lineBreakPositions"), or array of type @MinLen(-9223372036854775808) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + final int startOfLine = lineBreakPositions[lineNo]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + return lines[lineNo]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + array.length.negative + Variable used in array creation could be negative. + final int[] lineBreakPositions = new int[size() + 1]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/AvoidEscapedUnicodeCharactersCheck.java + argument + incompatible argument for parameter from of copyOfRange. + comment.getEndColNo() + 1, codePoints.length)); +
+ found : int + required: @LTEqLengthOf("codePoints") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/AvoidEscapedUnicodeCharactersCheck.java + argument + incompatible argument for parameter from of copyOfRange. + comment.getEndColNo() + 1, codePoints.length)); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + final int tokenCount = counts[element - 1]; +
+ found : int + required: @IndexFor("this.counts") or @LTLengthOf("this.counts") -- an integer less than this.counts's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + total += counts[element - 1]; +
+ found : int + required: @IndexFor("this.counts") or @LTLengthOf("this.counts") -- an integer less than this.counts's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + counts[type - 1]++; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + final int tokenCount = counts[element - 1]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + total += counts[element - 1]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/FinalParametersCheck.java + argument + incompatible argument for parameter bitIndex of get. + && primitiveDataTypes.get(parameterType.getType())) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheck.java + argument + incompatible argument for parameter pos of seek. + file.seek(file.length() - len); +
+ found : long + required: @NonNegative long +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheck.java + array.length.negative + Variable used in array creation could be negative. + final byte[] lastBytes = new byte[len]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/SuppressWarningsHolder.java + argument + incompatible argument for parameter beginIndex of substring. + expr = quotedText.substring(1, quotedText.length() - 1); +
+ found : @UpperBoundLiteral(1) int + required: @LTEqLengthOf("quotedText") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/SuppressWarningsHolder.java + argument + incompatible argument for parameter endIndex of substring. + expr = quotedText.substring(1, quotedText.length() - 1); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/SuppressWarningsHolder.java + argument + incompatible argument for parameter endIndex of substring. + return sourceNameLower.substring(startIndex, endIndex); +
+ found : @LTEqLengthOf("sourceName") int + required: @LTEqLengthOf("sourceNameLower") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/SuppressWarningsHolder.java + argument + incompatible argument for parameter endIndex of substring. + return sourceNameLower.substring(startIndex, endIndex); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheck.java + argument + incompatible argument for parameter from of copyOfRange. + lastChild.getColumnNo() + 2, lineCodePoints.length); +
+ found : int + required: @LTEqLengthOf("lineCodePoints") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheck.java + argument + incompatible argument for parameter from of copyOfRange. + lastChild.getColumnNo() + 2, lineCodePoints.length); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java + argument + incompatible argument for parameter beginIndex of substring. + final String removePattern = regexp.substring("^.+".length()); +
+ found : @LTEqLengthOf(""^.+"") int + required: @LTEqLengthOf("regexp") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java + argument + incompatible argument for parameter endIndex of substring. + .substring(0, fileNameWithPath.lastIndexOf(File.separator)); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java + array.initializer + incompatible types in array initializer. + WRONG_LANGUAGE_CODE_KEY, new Object[] {code}, getId(), getClass(), null); +
+ found : @SameLen({"code", "iter#num0.next()"}) String + required: @SameLen({"code", "[error for expression: iter#num0.next(); error: Invalid 'iter#num0.next()' because the expression did not parse. Error message: Lexical error at line 1, column 5. Encountered: "#" (35), after : ""]"}) Object +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java + expression.unparsable + Expression invalid in dependent type annotation: [error for expression: iter#num0.next(); error: Invalid 'iter#num0.next()' because the expression did not parse. Error message: Lexical error at line 1, column 5. Encountered: "#" (35), after : ""] + WRONG_LANGUAGE_CODE_KEY, new Object[] {code}, getId(), getClass(), null); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedCheck.java + argument + incompatible argument for parameter bitIndex of get. + if (TYPES_HASH_SET.get(type)) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedCheck.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + && child.getChildren()[0].getType() == JavadocTokenTypes.DEPRECATED_LITERAL) { +
+ found : DetailNode [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/SuppressWarningsCheck.java + argument + incompatible argument for parameter beginIndex of substring. + return warning.substring(1, warning.length() - 1); +
+ found : @UpperBoundLiteral(1) int + required: @LTEqLengthOf("warning") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/SuppressWarningsCheck.java + argument + incompatible argument for parameter endIndex of substring. + return warning.substring(1, warning.length() - 1); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheck.java + argument + incompatible argument for parameter from of copyOfRange. + slistColNo + 1, codePointsFirstLine.length); +
+ found : int + required: @LTEqLengthOf("codePointsFirstLine") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheck.java + argument + incompatible argument for parameter from of copyOfRange. + slistColNo + 1, codePointsFirstLine.length); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheck.java + argument + incompatible argument for parameter from of copyOfRange. + slistColNo + 1, rcurlyColNo); +
+ found : int + required: @LTEqLengthOf("this.getLineCodePoints(slistLineNo - 1)") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheck.java + argument + incompatible argument for parameter from of copyOfRange. + slistColNo + 1, rcurlyColNo); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheck.java + argument + incompatible argument for parameter index of charAt. + || braceLine.charAt(brace.getColumnNo() + 1) != '}') { +
+ found : int + required: @LTLengthOf("braceLine") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheck.java + argument + incompatible argument for parameter index of charAt. + || braceLine.charAt(brace.getColumnNo() + 1) != '}') { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AvoidDoubleBraceInitializationCheck.java + argument + incompatible argument for parameter bitIndex of get. + token -> !IGNORED_TYPES.get(token.getType()); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + argument + incompatible argument for parameter bitIndex of get. + return ASSIGN_OPERATOR_TYPES.get(parentType); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + argument + incompatible argument for parameter bitIndex of get. + return LOOP_TYPES.get(ast); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java + argument + incompatible argument for parameter beginIndex of substring. + setterName = name.substring(0, 1).toUpperCase(Locale.ENGLISH) + name.substring(1); +
+ found : @UpperBoundLiteral(1) int + required: @LTEqLengthOf("name") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java + argument + incompatible argument for parameter endIndex of substring. + setterName = name.substring(0, 1).toUpperCase(Locale.ENGLISH) + name.substring(1); +
+ found : @UpperBoundLiteral(1) int + required: @LTEqLengthOf("name") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java + argument + incompatible argument for parameter index of charAt. + if (name.length() == 1 || !Character.isUpperCase(name.charAt(1))) { +
+ found : @UpperBoundLiteral(1) int + required: @LTLengthOf("name") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java + argument + incompatible argument for parameter index of charAt. + && illegal.charAt(pkgNameLen) == '.' +
+ found : int + required: @LTLengthOf("illegal") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java + argument + incompatible argument for parameter index of charAt. + && illegal.charAt(pkgNameLen) == '.' +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheck.java + argument + incompatible argument for parameter bitIndex of get. + if (memberModifiers.get(modifier.getType())) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheck.java + argument + incompatible argument for parameter bitIndex of get. + return COMPARISON_TYPES.get(astType); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheck.java + argument + incompatible argument for parameter bitIndex of get. + while (skipTokens.get(result.getType())) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java + argument + incompatible argument for parameter bitIndex of get. + if (!constantWaiverParentToken.get(type)) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ModifiedControlVariableCheck.java + argument + incompatible argument for parameter bitIndex of get. + return MUTATION_OPERATIONS.get(iteratingExpressionAST.getType()); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleStringLiteralsCheck.java + argument + incompatible argument for parameter bitIndex of get. + if (ignoreOccurrenceContext.get(type)) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleStringLiteralsCheck.java + argument + incompatible argument for parameter bitIndex of set. + ignoreOccurrenceContext.set(type); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/PackageDeclarationCheck.java + argument + incompatible argument for parameter endIndex of substring. + return fileName.substring(0, lastSeparatorPos); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter bitIndex of get. + return ASSIGN_TOKENS.get(tokenType); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter bitIndex of get. + return COMPOUND_ASSIGN_TOKENS.get(tokenType); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter bitIndex of get. + return DECLARATION_TOKENS.get(parentType); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/InnerTypeLastCheck.java + argument + incompatible argument for parameter bitIndex of get. + && CLASS_MEMBER_TOKENS.get(nextSibling.getType())) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/HeaderCheck.java + argument + incompatible argument for parameter bitIndex of get. + return ignoreLines.get(lineNo); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/RegexpHeaderCheck.java + argument + incompatible argument for parameter bitIndex of get. + return multiLines.get(lineNo + 1); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportCheck.java + argument + incompatible argument for parameter beginIndex of substring. + excludeMinusDotStar.length() + 1); +
+ found : @LTLengthOf(value={"exclude.substring(0, exclude.length() - 2)", "excludeMinusDotStar"}, offset={"-2", "-2"}) int + required: @LTEqLengthOf("classOrStaticMember") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheck.java + argument + incompatible argument for parameter endIndex of substring. + ruleStr.indexOf(')')); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + final String import1Token = import1Tokens[i]; +
+ found : int + required: @IndexFor("import1Tokens") or @LTLengthOf("import1Tokens") -- an integer less than import1Tokens's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + if (CommonUtil.isBlank(lines[i - 1])) { +
+ found : int + required: @IndexFor("lines") or @LTLengthOf("lines") -- an integer less than lines's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheck.java + array.access.unsafe.high.range + Potentially unsafe array access: the index could be larger than the array's bound + final String import2Token = import2Tokens[i]; +
+ index type found: @IntRange(from=-2147483648) int + array type found: String @ArrayLenRange(from=1) [] + required : index of type @IndexFor("import2Tokens") or @LTLengthOf("import2Tokens"), or array of type @MinLen(-9223372036854775808) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + if (CommonUtil.isBlank(lines[i - 1])) { +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java + argument + incompatible argument for parameter beginIndex of substring. + pkg = pkg.substring(1, pkg.length() - 1); +
+ found : @UpperBoundLiteral(1) int + required: @LTEqLengthOf("pkg") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java + argument + incompatible argument for parameter endIndex of substring. + pkg = pkg.substring(1, pkg.length() - 1); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java + argument + incompatible argument for parameter endIndex of substring. + return qualifiedImportName.substring(0, lastDotIndex); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgImportControl.java + argument + incompatible argument for parameter index of charAt. + && (pkg.length() == length || pkg.charAt(length) == '.'); +
+ found : @LTEqLengthOf("this.fullPackageName") int + required: @LTLengthOf("pkg") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/RedundantImportCheck.java + argument + incompatible argument for parameter endIndex of substring. + final String front = importName.substring(0, index); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/AbstractExpressionHandler.java + argument + incompatible argument for parameter index of charAt. + while (Character.isWhitespace(line.charAt(index))) { +
+ found : int + required: @LTLengthOf("line") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/AnnotationArrayInitHandler.java + argument + incompatible argument for parameter index of charAt. + && Character.isWhitespace(line.charAt(realColumnNo))) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/AnnotationArrayInitHandler.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + final String line = getIndentCheck().getLines()[lineNo - 1]; +
+ found : int + required: @IndexFor("this.getIndentCheck().getLines()") or @LTLengthOf("this.getIndentCheck().getLines()") -- an integer less than this.getIndentCheck().getLines()'s length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/AnnotationArrayInitHandler.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + final String line = getIndentCheck().getLines()[lineNo - 1]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ArrayInitHandler.java + argument + incompatible argument for parameter index of charAt. + && Character.isWhitespace(line.charAt(realColumnNo))) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ArrayInitHandler.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + final String line = getIndentCheck().getLines()[lineNo - 1]; +
+ found : int + required: @IndexFor("this.getIndentCheck().getLines()") or @LTLengthOf("this.getIndentCheck().getLines()") -- an integer less than this.getIndentCheck().getLines()'s length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ArrayInitHandler.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + final String line = getIndentCheck().getLines()[lineNo - 1]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CommentsIndentationCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + final char[] line = getLines()[lineNo - 1].toCharArray(); +
+ found : int + required: @IndexFor("this.getLines()") or @LTLengthOf("this.getLines()") -- an integer less than this.getLines()'s length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CommentsIndentationCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + while (Character.isWhitespace(line[lineStart])) { +
+ found : int + required: @IndexFor("line") or @LTLengthOf("line") -- an integer less than line's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CommentsIndentationCheck.java + array.access.unsafe.high.range + Potentially unsafe array access: the index could be larger than the array's bound + if (CommonUtil.isBlank(lines[lineNo])) { +
+ index type found: @IntRange(from=-2147483648, to=2147483646) int + array type found: String [] + required : index of type @IndexFor("lines") or @LTLengthOf("lines"), or array of type @MinLen(2147483647) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CommentsIndentationCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + final char[] line = getLines()[lineNo - 1].toCharArray(); +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CommentsIndentationCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + if (CommonUtil.isBlank(lines[lineNo])) { +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + array.access.unsafe.high.range + Potentially unsafe array access: the index could be larger than the array's bound + types[index] = val; +
+ index type found: @IntRange(from=-2147483648) int + array type found: int [] + required : index of type @IndexFor("types") or @LTLengthOf("types"), or array of type @MinLen(-9223372036854775808) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java + argument + incompatible argument for parameter bitIndex of get. + return levels.get(indent); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java + argument + incompatible argument for parameter bitIndex of set. + levels.set(i + offset); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java + argument + incompatible argument for parameter bitIndex of set. + levels.set(indent); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java + argument + incompatible argument for parameter bitIndex of set. + result.levels.set(addition); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/LineWrappingHandler.java + argument + incompatible argument for parameter index of charAt. + while (Character.isWhitespace(line.charAt(index))) { +
+ found : int + required: @LTLengthOf("line") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/SlistHandler.java + argument + incompatible argument for parameter bitIndex of get. + return PARENT_TOKEN_TYPES.get(parentType); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/AtclauseOrderCheck.java + argument + incompatible argument for parameter bitIndex of get. + if (target.get(parentType)) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/HtmlTag.java + argument + incompatible argument for parameter beginIndex of substring. + return text.substring(startOfText, endOfText); +
+ found : int + required: @LTEqLengthOf("this.text") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/HtmlTag.java + argument + incompatible argument for parameter beginIndex of substring. + return text.substring(startOfText, endOfText); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/HtmlTag.java + argument + incompatible argument for parameter endIndex of substring. + return text.substring(startOfText, endOfText); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/HtmlTag.java + argument + incompatible argument for parameter index of charAt. + return position != text.length() - 1 && text.charAt(position + 1) == '/'; +
+ found : int + required: @LTLengthOf("this.text") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/HtmlTag.java + argument + incompatible argument for parameter index of charAt. + return position != text.length() - 1 && text.charAt(position + 1) == '/'; +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + argument + incompatible argument for parameter beginIndex of substring. + arg1.substring(1, arg1.length() - 1)); +
+ found : @UpperBoundLiteral(1) int + required: @LTEqLengthOf("arg1") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + argument + incompatible argument for parameter endIndex of substring. + arg1.substring(1, arg1.length() - 1)); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + argument + incompatible argument for parameter endIndex of substring. + currentClassName = currentClassName.substring(0, dotIdx); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + multilineCont = MATCH_JAVADOC_MULTILINE_CONT.matcher(lines[remIndex]); +
+ found : int + required: @IndexFor("lines") or @LTLengthOf("lines") -- an integer less than lines's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + multilineCont = MATCH_JAVADOC_MULTILINE_CONT.matcher(lines[remIndex]); +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMissingWhitespaceAfterAsteriskCheck.java + argument + incompatible argument for parameter index of charAt. + && !Character.isWhitespace(text.charAt(lastAsteriskPosition + 1))) { +
+ found : int + required: @LTLengthOf("text") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMissingWhitespaceAfterAsteriskCheck.java + argument + incompatible argument for parameter index of charAt. + && !Character.isWhitespace(text.charAt(lastAsteriskPosition + 1))) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java + argument + incompatible argument for parameter beginIndex of substring. + builder.append(line.substring(textStart)); +
+ found : int + required: @LTEqLengthOf("line") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java + argument + incompatible argument for parameter beginIndex of substring. + builder.append(line.substring(textStart)); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java + argument + incompatible argument for parameter index of charAt. + if (Character.isWhitespace(builder.charAt(index))) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java + argument + incompatible argument for parameter index of charAt. + if (line.charAt(textStart) == '@') { +
+ found : int + required: @LTLengthOf("line") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java + argument + incompatible argument for parameter index of charAt. + if (line.charAt(textStart) == '@') { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java + argument + incompatible argument for parameter index of charAt. + while (builder.charAt(index - 1) == '*') { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java + argument + incompatible argument for parameter index of deleteCharAt. + builder.deleteCharAt(index - 1); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java + argument + incompatible argument for parameter index of deleteCharAt. + builder.deleteCharAt(index); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + text[tag.getLineNo() - lineNo]); +
+ found : int + required: @IndexFor("text") or @LTLengthOf("text") -- an integer less than text's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + text[tag.getLineNo() - lineNo]); +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTagContinuationIndentationCheck.java + argument + incompatible argument for parameter beginIndex of substring. + else if (!CommonUtil.isBlank(text.substring(1, offset + 1))) { +
+ found : @UpperBoundLiteral(1) int + required: @LTEqLengthOf("text") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTagContinuationIndentationCheck.java + argument + incompatible argument for parameter endIndex of substring. + else if (!CommonUtil.isBlank(text.substring(1, offset + 1))) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTagInfo.java + argument + incompatible argument for parameter bitIndex of get. + return DEF_TOKEN_TYPES.get(astType) +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTagInfo.java + argument + incompatible argument for parameter bitIndex of get. + return DEF_TOKEN_TYPES_DEPRECATED.get(astType) +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/RequireEmptyLineBeforeBlockTagGroupCheck.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + tagNode.getChildren()[0].getText()); +
+ found : DetailNode [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + argument + incompatible argument for parameter bitIndex of get. + && ALLOWED_TYPES.get(child.getType())) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + argument + incompatible argument for parameter end of append. + result.append(text, 0, text.indexOf(periodSuffix) + 1); +
+ found : @LTLengthOf(value="text", offset="-2") int + required: @LTEqLengthOf("text") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + final DetailNode child = children[i]; +
+ found : int + required: @IndexFor("children") or @LTLengthOf("children") -- an integer less than children's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + && node.getChildren()[0].getChildren().length > 1) { +
+ found : DetailNode [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + child.getChildren()[0].getChildren()[0])); +
+ found : DetailNode [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + node = node.getChildren()[0].getChildren()[1]; +
+ found : DetailNode [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 1 could be larger than the array's bound + && child.getChildren()[1].getType() == JavadocTokenTypes.INHERIT_DOC_LITERAL) { +
+ found : DetailNode [] + required: @MinLen(2) -- an array guaranteed to have at least 2 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 1 could be larger than the array's bound + && name.equals(child[1].getText()); +
+ found : DetailNode [] + required: @MinLen(2) -- an array guaranteed to have at least 2 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 1 could be larger than the array's bound + node = node.getChildren()[0].getChildren()[1]; +
+ found : DetailNode [] + required: @MinLen(2) -- an array guaranteed to have at least 2 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 1 could be larger than the array's bound + node = node.getChildren()[1]; +
+ found : DetailNode [] + required: @MinLen(2) -- an array guaranteed to have at least 2 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 1 could be larger than the array's bound + return child[1].getType() == JavadocTokenTypes.CUSTOM_NAME +
+ found : DetailNode [] + required: @MinLen(2) -- an array guaranteed to have at least 2 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 3 could be larger than the array's bound + DetailNode currentNode = childrenOfInlineTag[indexOfContentOfSummaryTag]; +
+ found : DetailNode [] + required: @MinLen(4) -- an array guaranteed to have at least 4 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + argument + incompatible argument for parameter beginIndex of substring. + text = text.substring(column).trim(); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + argument + incompatible argument for parameter endIndex of substring. + .substring(0, toPoint.getColumnNo() + 1).endsWith("-->")) { +
+ found : int + required: @LTEqLengthOf("text[toPoint.getLineNo()]") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + argument + incompatible argument for parameter endIndex of substring. + .substring(0, toPoint.getColumnNo() + 1).endsWith("-->")) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + argument + incompatible argument for parameter endIndex of substring. + tagId = text.substring(0, position); +
+ found : int + required: @LTEqLengthOf("text") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + argument + incompatible argument for parameter index of charAt. + && text[curr.getLineNo()].charAt(curr.getColumnNo()) != character) { +
+ found : int + required: @LTLengthOf("text[curr.getLineNo()]") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + argument + incompatible argument for parameter index of charAt. + && text[curr.getLineNo()].charAt(curr.getColumnNo()) != character) { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + argument + incompatible argument for parameter index of charAt. + .charAt(endTag.getColumnNo() - 1) == '/'; +
+ found : int + required: @LTLengthOf("text[endTag.getLineNo()]") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + argument + incompatible argument for parameter index of charAt. + .charAt(endTag.getColumnNo() - 1) == '/'; +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + argument + incompatible argument for parameter index of charAt. + if (text.charAt(column) == '/') { +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + argument + incompatible argument for parameter index of charAt. + || Character.isJavaIdentifierStart(text.charAt(column)) +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + argument + incompatible argument for parameter index of charAt. + || text.charAt(column) == '/'; +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + && text[curr.getLineNo()].charAt(curr.getColumnNo()) != character) { +
+ found : int + required: @IndexFor("text") or @LTLengthOf("text") -- an integer less than text's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + && text[endTag.getLineNo()] +
+ found : int + required: @IndexFor("text") or @LTLengthOf("text") -- an integer less than text's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + String text = javadocText[tagStart.getLineNo()]; +
+ found : int + required: @IndexFor("javadocText") or @LTLengthOf("javadocText") -- an integer less than javadocText's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + final String text = javadocText[pos.getLineNo()]; +
+ found : int + required: @IndexFor("javadocText") or @LTLengthOf("javadocText") -- an integer less than javadocText's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + return text[pos.getLineNo()].startsWith("<!--", pos.getColumnNo()); +
+ found : int + required: @IndexFor("text") or @LTLengthOf("text") -- an integer less than text's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + text[position.getLineNo()])); +
+ found : int + required: @IndexFor("text") or @LTLengthOf("text") -- an integer less than text's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + while (toPoint.getLineNo() < text.length && !text[toPoint.getLineNo()] +
+ found : int + required: @IndexFor("text") or @LTLengthOf("text") -- an integer less than text's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + && text[curr.getLineNo()].charAt(curr.getColumnNo()) != character) { +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + && text[endTag.getLineNo()] +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + String text = javadocText[tagStart.getLineNo()]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + final String text = javadocText[pos.getLineNo()]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + return text[pos.getLineNo()].startsWith("<!--", pos.getColumnNo()); +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + text[position.getLineNo()])); +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + while (line < text.length && column >= text[line].length()) { +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + while (toPoint.getLineNo() < text.length && !text[toPoint.getLineNo()] +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheck.java + argument + incompatible argument for parameter beginIndex of substring. + final String content = commentValue.substring(contentStart); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheck.java + argument + incompatible argument for parameter beginIndex of substring. + final String content = commentValue.substring(contentStart); +
+ found : int + required: @LTEqLengthOf("commentValue") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/BlockTagUtil.java + argument + incompatible argument for parameter beginIndex of substring. + final String remainder = line.substring(tagMatcher.end(1)); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/BlockTagUtil.java + argument + incompatible argument for parameter beginIndex of substring. + final String remainder = line.substring(tagMatcher.end(1)); +
+ found : int + required: @LTEqLengthOf("line") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/InlineTagUtil.java + argument + incompatible argument for parameter endIndex of subSequence. + final String precedingText = source.subSequence(0, index).toString(); +
+ found : int + required: @LTEqLengthOf("source") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/InlineTagUtil.java + argument + incompatible argument for parameter endIndex of subSequence. + final String precedingText = source.subSequence(0, index).toString(); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java + argument + incompatible argument for parameter endIndex of substring. + classNameWithPackage.substring(0, lastDotIndex); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java + argument + incompatible argument for parameter beginIndex of substring. + result = str.substring(beginIndex); +
+ found : int + required: @LTEqLengthOf("str") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java + argument + incompatible argument for parameter beginIndex of substring. + result = str.substring(beginIndex); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java + argument + incompatible argument for parameter beginIndex of substring. + result = str.substring(beginIndex, endIndex); +
+ found : int + required: @LTEqLengthOf("str") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java + argument + incompatible argument for parameter beginIndex of substring. + result = str.substring(beginIndex, endIndex); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java + argument + incompatible argument for parameter endIndex of substring. + result = str.substring(beginIndex, endIndex); +
+ found : int + required: @LTEqLengthOf("str") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java + argument + incompatible argument for parameter endIndex of substring. + result = str.substring(beginIndex, endIndex); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/SinglelineDetector.java + argument + incompatible argument for parameter start of find. + final boolean foundMatch = matcher.find(startPosition); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java + argument + incompatible argument for parameter bitIndex of set. + usedLines.set(lineIndex); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java + argument + incompatible argument for parameter fromIndex of set. + usedLines.set(lineIndex, endLineIndex + 1); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java + argument + incompatible argument for parameter toIndex of set. + usedLines.set(lineIndex, endLineIndex + 1); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/AbstractParenPadCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + && line[before] != OPEN_PARENTHESIS) { +
+ found : int + required: @IndexFor("line") or @LTLengthOf("line") -- an integer less than line's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/AbstractParenPadCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + && line[after] != CLOSE_PARENTHESIS) { +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + .filter(index -> line[index] == '&') +
+ found : int + required: @IndexFor("line") or @LTLengthOf("line") -- an integer less than line's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + else if (line[after] == ' ') { +
+ found : int + required: @IndexFor("line") or @LTLengthOf("line") -- an integer less than line's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + final char charAfter = Character.toChars(line[after])[0]; +
+ found : int + required: @IndexFor("line") or @LTLengthOf("line") -- an integer less than line's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + final char charAfter = Character.toChars(line[after])[0]; +
+ found : char [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + .filter(index -> line[index] == '&') +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + else if (line[after] == ' ') { +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + final char charAfter = Character.toChars(line[after])[0]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheck.java + argument + incompatible argument for parameter bitIndex of get. + return acceptableTokens.get(ast.getType()); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapCheck.java + argument + incompatible argument for parameter from of copyOfRange. + Arrays.copyOfRange(currentLine, colNo + text.length(), currentLine.length) +
+ found : @LTLengthOf(value={"ast.getText()", "text"}, offset={"-colNo - 1", "-colNo - 1"}) int + required: @LTEqLengthOf("currentLine") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapCheck.java + argument + incompatible argument for parameter from of copyOfRange. + Arrays.copyOfRange(currentLine, colNo + text.length(), currentLine.length) +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SingleSpaceSeparatorCheck.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + return line[columnNo] == ' '; +
+ found : int + required: @IndexFor("line") or @LTLengthOf("line") -- an integer less than line's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SingleSpaceSeparatorCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + return line[columnNo] == ' '; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + final int codePoint = line[after]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + final char nextChar = Character.toChars(line[after])[0]; +
+ found : char [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + final char nextChar = Character.toChars(line[after])[0]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + tagCommentLine(text[0], startLineNo); +
+ found : String [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + tagCommentLine(text[0], startLineNo, comment.getStartColNo()); +
+ found : String [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/CodeSelectorPresentation.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + detailNode.getChildren()[detailNode.getChildren().length - 1]; +
+ found : @GTENegativeOne int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTablePresentation.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + result = ((DetailNode) parent).getChildren()[index]; +
+ found : int + required: @IndexFor("(DetailNode)parent.getChildren()") or @LTLengthOf("(DetailNode)parent.getChildren()") -- an integer less than (DetailNode)parent.getChildren()'s length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTablePresentation.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + return COLUMN_NAMES[column]; +
+ found : int + required: @IndexFor("com.puppycrawl.tools.checkstyle.gui.ParseTreeTablePresentation.COLUMN_NAMES") or @LTLengthOf("com.puppycrawl.tools.checkstyle.gui.ParseTreeTablePresentation.COLUMN_NAMES") -- an integer less than com.puppycrawl.tools.checkstyle.gui.ParseTreeTablePresentation.COLUMN_NAMES's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTablePresentation.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + result = ((DetailNode) parent).getChildren()[index]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTablePresentation.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + return COLUMN_NAMES[column]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableModelAdapter.java + override.return + Incompatible return type. + public int getColumnCount() { +
+ found : int + required: @NonNegative int + Consequence: method in TreeTableModelAdapter + int getColumnCount(TreeTableModelAdapter this) + cannot override method in TableModel + @NonNegative int getColumnCount(TableModel this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableModelAdapter.java + override.return + Incompatible return type. + public int getRowCount() { +
+ found : int + required: @NonNegative int + Consequence: method in TreeTableModelAdapter + int getRowCount(TreeTableModelAdapter this) + cannot override method in TableModel + @NonNegative int getRowCount(TableModel this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/JavadocMetadataScraper.java + argument + incompatible argument for parameter endIndex of substring. + result.addLast(fileName.substring(0, fileName.length() - JAVA_FILE_EXTENSION.length())); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/JavadocMetadataScraper.java + argument + incompatible argument for parameter endIndex of substring. + return fileName.substring(0, fileName.length() - JAVA_FILE_EXTENSION.length()); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + argument + incompatible argument for parameter initialCapacity of ArrayList. + final List<ModulePropertyDetails> result = new ArrayList<>(propertyListLength); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + argument + incompatible argument for parameter initialCapacity of ArrayList. + final List<String> listContent = new ArrayList<>(nodeListLength); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaWriter.java + argument + incompatible argument for parameter beginIndex of substring. + + moduleFilePath.substring(indexOfCheckstyle + 1) + xmlExtension; +
+ found : @LTLengthOf(value={""checkstyle"", "checkstyleString", "moduleFilePath", "moduleFilePath"}, offset={"-moduleFilePath.indexOf(checkstyleString) - 2", "-moduleFilePath.indexOf(checkstyleString) - 2", "-12", "-checkstyleString.length() - 2"}) int + required: @LTEqLengthOf("moduleFilePath") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaWriter.java + argument + incompatible argument for parameter endIndex of substring. + + moduleFilePath.substring(0, indexOfCheckstyle) + "/meta/" +
+ found : @LTLengthOf(value={""checkstyle"", "checkstyleString", "moduleFilePath", "moduleFilePath"}, offset={"-moduleFilePath.indexOf(checkstyleString) - 1", "-moduleFilePath.indexOf(checkstyleString) - 1", "-11", "-checkstyleString.length() - 1"}) int + required: @LTEqLengthOf("moduleFilePath") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/ChainedPropertyUtil.java + argument + incompatible argument for parameter endIndex of substring. + return variableExpression.substring(propertyStartIndex, propertyEndIndex); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter beginIndex of substring. + returnString = line.substring(indent, lastNonWhitespace); +
+ found : int + required: @LTEqLengthOf("line") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter beginIndex of substring. + returnString = line.substring(indent, lastNonWhitespace); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter beginIndex of substring. + txt = txt.substring(1); +
+ found : @UpperBoundLiteral(1) int + required: @LTEqLengthOf("txt") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter endIndex of substring. + returnString = line.substring(indent, lastNonWhitespace); +
+ found : int + required: @LTEqLengthOf("line") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter endIndex of substring. + txt = txt.substring(0, txt.length() - 1); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter radix of parseInt. + result = Integer.parseInt(txt, radix); +
+ found : int + required: @IntRange(from=2, to=36) int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter radix of parseInt. + result = Integer.parseInt(txt, radix); +
+ found : int + required: @Positive int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter radix of parseLong. + result = Long.parseLong(txt, radix); +
+ found : int + required: @IntRange(from=2, to=36) int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter radix of parseLong. + result = Long.parseLong(txt, radix); +
+ found : int + required: @Positive int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter radix of parseUnsignedInt. + result = Integer.parseUnsignedInt(txt, radix); +
+ found : int + required: @IntRange(from=2, to=36) int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter radix of parseUnsignedInt. + result = Integer.parseUnsignedInt(txt, radix); +
+ found : int + required: @Positive int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter radix of parseUnsignedLong. + result = Long.parseUnsignedLong(txt, radix); +
+ found : int + required: @IntRange(from=2, to=36) int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter radix of parseUnsignedLong. + result = Long.parseUnsignedLong(txt, radix); +
+ found : int + required: @Positive int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CodePointUtil.java + argument + incompatible argument for parameter from of copyOfRange. + return Arrays.copyOfRange(codePoints, startIndex, codePoints.length); +
+ found : int + required: @LTEqLengthOf("codePoints") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + argument + incompatible argument for parameter beginIndex of substring. + .substring(lastIndexOfClasspathProtocol)); +
+ found : @LTEqLengthOf("com.puppycrawl.tools.checkstyle.utils.CommonUtil.CLASSPATH_URL_PROTOCOL") int + required: @LTEqLengthOf("filename") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + argument + incompatible argument for parameter index of charAt. + if (!Character.isWhitespace(line.charAt(i))) { +
+ found : int + required: @LTLengthOf("line") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + argument + incompatible argument for parameter index of charAt. + if (filename.charAt(0) == '/') { +
+ found : @UpperBoundLiteral(0) int + required: @LTLengthOf("filename") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + argument + incompatible argument for parameter index of charAt. + isIdentifier = Character.isJavaIdentifierStart(str.charAt(0)); +
+ found : @UpperBoundLiteral(0) int + required: @LTLengthOf("str") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + argument + incompatible argument for parameter index of codePointAt. + if (inputString.codePointAt(idx) == '\t') { +
+ found : int + required: @LTLengthOf("inputString") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + final char character = Character.toChars(codePoints[index])[0]; +
+ found : int + required: @IndexFor("codePoints") or @LTLengthOf("codePoints") -- an integer less than codePoints's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + final char character = Character.toChars(codePoints[index])[0]; +
+ found : char [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + final char character = Character.toChars(codePoints[index])[0]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtil.java + argument + incompatible argument for parameter beginIndex of substring. + return commentContent.getText().substring(1); +
+ found : @UpperBoundLiteral(1) int + required: @LTEqLengthOf("commentContent.getText()") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtil.java + array.access.unsafe.high + Potentially unsafe array access: the index could be larger than the array's bound + previousSibling = children[previousSiblingIndex]; +
+ found : int + required: @IndexFor("children") or @LTLengthOf("children") -- an integer less than children's length +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtil.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + resultNode = node.getChildren()[0]; +
+ found : DetailNode [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtil.java + array.access.unsafe.low + Potentially unsafe array access: the index could be negative. + nextSibling = children[nextSiblingIndex]; +
+ found : int + required: an integer >= 0 (@NonNegative or @Positive) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/TokenUtil.java + methodref.param + Incompatible parameter type for bitIndex + .collect(BitSet::new, BitSet::set, BitSet::or); +
+ found : @IntRangeFromNonNegative int + required: int + Consequence: method in BitSet + void set(BitSet this, @IntRangeFromNonNegative int p0) + is not a valid method reference for method in ObjIntConsumer<BitSet> + void accept(ObjIntConsumer<BitSet> this, BitSet p0, int p1) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/TokenUtil.java + methodref.param + Incompatible parameter type for bitIndex + .collect(BitSet::new, BitSet::set, BitSet::or); +
+ found : @NonNegative int + required: int + Consequence: method in BitSet + void set(BitSet this, @NonNegative int p0) + is not a valid method reference for method in ObjIntConsumer<BitSet> + void accept(ObjIntConsumer<BitSet> this, BitSet p0, int p1) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/XpathUtil.java + argument + incompatible argument for parameter beginIndex of substring. + text = text.substring(1, text.length() - 1); +
+ found : @UpperBoundLiteral(1) int + required: @LTEqLengthOf("text") int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/XpathUtil.java + argument + incompatible argument for parameter bitIndex of get. + return TOKEN_TYPES_WITH_TEXT_ATTRIBUTE.get(ast.getType()); +
+ found : int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/XpathUtil.java + argument + incompatible argument for parameter endIndex of substring. + text = text.substring(1, text.length() - 1); +
+ found : @GTENegativeOne int + required: @NonNegative int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/XpathQueryGenerator.java + array.access.unsafe.high.constant + Potentially unsafe array access: the constant index 0 could be larger than the array's bound + sb.append(encodeCharacter(Character.toChars(chr)[0])); +
+ found : char [] + required: @MinLen(1) -- an array guaranteed to have at least 1 elements +
+
+
diff --git a/.ci/checker-framework-suppressions/checker-framework-lock-tainting-suppressions.xml b/.ci/checker-framework-suppressions/checker-framework-lock-tainting-suppressions.xml new file mode 100644 index 00000000000..3107aa6d369 --- /dev/null +++ b/.ci/checker-framework-suppressions/checker-framework-lock-tainting-suppressions.xml @@ -0,0 +1,1194 @@ + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java + methodref.receiver.bound + Incompatible receiver type + .filter(ExternalResourceHolder.class::isInstance) +
+ found : @GuardedBy Class<@GuardedBy ExternalResourceHolder> + required: @GuardSatisfied Class<@GuardedBy ExternalResourceHolder> + Consequence: method + @GuardedBy Class<@GuardedBy ExternalResourceHolder> + is not a valid method reference for method in @GuardedBy Class<@GuardedBy ExternalResourceHolder> + @GuardedBy boolean isInstance(@GuardSatisfied Class<@GuardedBy ExternalResourceHolder> this, @GuardedBy Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + method.guarantee.violated + @SideEffectFree method toString calls method getColumnNo with a weaker @ReleasesNoLocks side effect guarantee + return text + "[" + getLineNo() + "x" + getColumnNo() + "]"; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + method.guarantee.violated + @SideEffectFree method toString calls method getLineNo with a weaker @ReleasesNoLocks side effect guarantee + return text + "[" + getLineNo() + "x" + getColumnNo() + "]"; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy DetailAstImpl + required: @GuardSatisfied Object + Consequence: method in @GuardedBy DetailAstImpl + @GuardedBy String toString(@GuardedBy DetailAstImpl this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + method.guarantee.violated + @SideEffectFree method toString calls method name with a weaker @ReleasesNoLocks side effect guarantee + return name().toLowerCase(Locale.ROOT); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + methodref.receiver.bound + Incompatible receiver type + messages.forEach(System.out::println); +
+ found : @GuardedBy PrintStream + required: @GuardSatisfied PrintStream + Consequence: method + @GuardedBy PrintStream + is not a valid method reference for method in @GuardedBy PrintStream + void println(@GuardSatisfied PrintStream this, @GuardedBy String p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy OutputFormat + required: @GuardSatisfied Object + Consequence: method in @GuardedBy OutputFormat + @GuardedBy String toString(@GuardedBy OutputFormat this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java + methodref.receiver + Incompatible receiver type + .map(Entry::getKey) +
+ found : @GuardSatisfied Entry<@GuardedBy String, @GuardedBy String> + required: @GuardedBy Entry<@GuardedBy String, @GuardedBy String> + Consequence: method in @GuardedBy Entry<@GuardedBy String, @GuardedBy String> + @GuardedBy String getKey(@GuardSatisfied Entry<@GuardedBy String, @GuardedBy String> this) + is not a valid method reference for method in @GuardedBy Function<@GuardedBy Entry<@GuardedBy String, @GuardedBy String>, @GuardedBy String> + @GuardedBy String apply(@GuardedBy Function<@GuardedBy Entry<@GuardedBy String, @GuardedBy String>, @GuardedBy String> this, @GuardedBy Entry<@GuardedBy String, @GuardedBy String> p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertiesExpander.java + methodref.receiver.bound + Incompatible receiver type + .collect(Collectors.toMap(Function.identity(), properties::getProperty)); +
+ found : @GuardedBy Properties + required: @GuardSatisfied Properties + Consequence: method + @GuardedBy Properties + is not a valid method reference for method in @GuardedBy Properties + @GuardedBy String getProperty(@GuardSatisfied Properties this, @GuardedBy String p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java + methodref.receiver + Incompatible receiver type + .thenComparing(AbstractCheck::hashCode)); +
+ found : @GuardSatisfied Object + required: @GuardedBy AbstractCheck + Consequence: method in @GuardedBy AbstractCheck + @GuardedBy int hashCode(@GuardSatisfied Object this) + is not a valid method reference for method in @GuardedBy Function<@GuardedBy AbstractCheck, @GuardedBy Integer> + @GuardedBy Integer apply(@GuardedBy Function<@GuardedBy AbstractCheck, @GuardedBy Integer> this, @GuardedBy AbstractCheck p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java + methodref.receiver.bound + Incompatible receiver type + .filter(ExternalResourceHolder.class::isInstance) +
+ found : @GuardedBy Class<@GuardedBy ExternalResourceHolder> + required: @GuardSatisfied Class<@GuardedBy ExternalResourceHolder> + Consequence: method + @GuardedBy Class<@GuardedBy ExternalResourceHolder> + is not a valid method reference for method in @GuardedBy Class<@GuardedBy ExternalResourceHolder> + @GuardedBy boolean isInstance(@GuardSatisfied Class<@GuardedBy ExternalResourceHolder> this, @GuardedBy Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XmlLoader.java + method.guarantee.violated + @Pure method resolveEntity calls method getClassLoader with a weaker @ReleasesNoLocks side effect guarantee + getClass().getClassLoader(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XmlLoader.java + method.guarantee.violated + @Pure method resolveEntity calls method getResourceAsStream with a weaker @ReleasesNoLocks side effect guarantee + loader.getResourceAsStream(dtdResourceName); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/BeforeExecutionFileFilterSet.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy BeforeExecutionFileFilterSet + required: @GuardSatisfied Object + Consequence: method in @GuardedBy BeforeExecutionFileFilterSet + @GuardedBy String toString(@GuardedBy BeforeExecutionFileFilterSet this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Comment.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy Comment + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Comment + @GuardedBy String toString(@GuardedBy Comment this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FilterSet.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy FilterSet + required: @GuardSatisfied Object + Consequence: method in @GuardedBy FilterSet + @GuardedBy String toString(@GuardedBy FilterSet this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FullIdent.java + method.guarantee.violated + @SideEffectFree method toString calls method getColumnNo with a weaker @ReleasesNoLocks side effect guarantee + + "[" + detailAst.getLineNo() + "x" + detailAst.getColumnNo() + "]"; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FullIdent.java + method.guarantee.violated + @SideEffectFree method toString calls method getLineNo with a weaker @ReleasesNoLocks side effect guarantee + + "[" + detailAst.getLineNo() + "x" + detailAst.getColumnNo() + "]"; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FullIdent.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy FullIdent + required: @GuardSatisfied Object + Consequence: method in @GuardedBy FullIdent + @GuardedBy String toString(@GuardedBy FullIdent this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/LineColumn.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @GuardedBy Object + required: @GuardSatisfied Object + Consequence: method in @GuardedBy LineColumn + @GuardedBy boolean equals(@GuardedBy LineColumn this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/LineColumn.java + override.receiver + Incompatible receiver type + public boolean equals(Object other) { +
+ found : @GuardedBy LineColumn + required: @GuardSatisfied Object + Consequence: method in @GuardedBy LineColumn + @GuardedBy boolean equals(@GuardedBy LineColumn this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/LineColumn.java + override.receiver + Incompatible receiver type + public int compareTo(LineColumn lineColumn) { +
+ found : @GuardedBy LineColumn + required: @GuardSatisfied Comparable<@GuardedBy LineColumn> + Consequence: method in @GuardedBy LineColumn + @GuardedBy int compareTo(@GuardedBy LineColumn this, @GuardedBy LineColumn p0) + cannot override method in @GuardedBy Comparable<@GuardedBy LineColumn> + @GuardedBy int compareTo(@GuardSatisfied Comparable<@GuardedBy LineColumn> this, @GuardedBy LineColumn p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/LineColumn.java + override.receiver + Incompatible receiver type + public int hashCode() { +
+ found : @GuardedBy LineColumn + required: @GuardSatisfied Object + Consequence: method in @GuardedBy LineColumn + @GuardedBy int hashCode(@GuardedBy LineColumn this) + cannot override method in @GuardedBy Object + @GuardedBy int hashCode(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Scope.java + method.guarantee.violated + @SideEffectFree method toString calls method getName with a weaker @ReleasesNoLocks side effect guarantee + return getName(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Scope.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy Scope + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Scope + @GuardedBy String toString(@GuardedBy Scope this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/SeverityLevel.java + method.guarantee.violated + @SideEffectFree method toString calls method getName with a weaker @ReleasesNoLocks side effect guarantee + return getName(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/SeverityLevel.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy SeverityLevel + required: @GuardSatisfied Object + Consequence: method in @GuardedBy SeverityLevel + @GuardedBy String toString(@GuardedBy SeverityLevel this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + method.guarantee.violated + @Pure method compareTo calls method getViolation with a weaker @ReleasesNoLocks side effect guarantee + result = getViolation().compareTo(other.getViolation()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + override.param + Incompatible parameter type for object. + public boolean equals(Object object) { +
+ found : @GuardedBy Object + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Violation + @GuardedBy boolean equals(@GuardedBy Violation this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + override.receiver + Incompatible receiver type + public boolean equals(Object object) { +
+ found : @GuardedBy Violation + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Violation + @GuardedBy boolean equals(@GuardedBy Violation this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + override.receiver + Incompatible receiver type + public int compareTo(Violation other) { +
+ found : @GuardedBy Violation + required: @GuardSatisfied Comparable<@GuardedBy Violation> + Consequence: method in @GuardedBy Violation + @GuardedBy int compareTo(@GuardedBy Violation this, @GuardedBy Violation p0) + cannot override method in @GuardedBy Comparable<@GuardedBy Violation> + @GuardedBy int compareTo(@GuardSatisfied Comparable<@GuardedBy Violation> this, @GuardedBy Violation p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + override.receiver + Incompatible receiver type + public int hashCode() { +
+ found : @GuardedBy Violation + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Violation + @GuardedBy int hashCode(@GuardedBy Violation this) + cannot override method in @GuardedBy Object + @GuardedBy int hashCode(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/OrderedPropertiesCheck.java + override.receiver + Incompatible receiver type + public synchronized Object put(Object key, Object value) { +
+ found : @GuardedBy SequencedProperties + required: @GuardSatisfied Hashtable<@GuardedBy Object, @GuardedBy Object> + Consequence: method in @GuardedBy SequencedProperties + @GuardedBy Object put(@GuardedBy SequencedProperties this, @GuardedBy Object p0, @GuardedBy Object p1) + cannot override method in @GuardedBy Hashtable<@GuardedBy Object, @GuardedBy Object> + @GuardedBy Object put(@GuardSatisfied Hashtable<@GuardedBy Object, @GuardedBy Object> this, @GuardedBy Object p0, @GuardedBy Object p1) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheck.java + override.receiver + Incompatible receiver type + public synchronized Object put(Object key, Object value) { +
+ found : @GuardedBy UniqueProperties + required: @GuardSatisfied Hashtable<@GuardedBy Object, @GuardedBy Object> + Consequence: method in @GuardedBy UniqueProperties + @GuardedBy Object put(@GuardedBy UniqueProperties this, @GuardedBy Object p0, @GuardedBy Object p1) + cannot override method in @GuardedBy Hashtable<@GuardedBy Object, @GuardedBy Object> + @GuardedBy Object put(@GuardSatisfied Hashtable<@GuardedBy Object, @GuardedBy Object> this, @GuardedBy Object p0, @GuardedBy Object p1) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheck.java + methodref.param + Incompatible parameter type for obj + Stream.iterate(startNode.getLastChild(), Objects::nonNull, +
+ found : @GuardSatisfied Object + required: @GuardedBy DetailAST + Consequence: method in @GuardedBy Objects + @GuardedBy boolean nonNull(@GuardSatisfied Object p0) + is not a valid method reference for method in @GuardedBy Predicate<@GuardedBy DetailAST> + @GuardedBy boolean test(@GuardedBy Predicate<@GuardedBy DetailAST> this, @GuardedBy DetailAST p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ModifiedControlVariableCheck.java + methodref.param + Incompatible parameter type for arg0 + return initializedVariables.stream().filter(iteratingVariables::contains) +
+ found : @GuardSatisfied Object + required: @GuardedBy String + Consequence: method in @GuardedBy Set<@GuardedBy String> + @GuardedBy boolean contains(@GuardSatisfied Set<@GuardedBy String> this, @GuardSatisfied Object p0) + is not a valid method reference for method in @GuardedBy Predicate<@GuardedBy String> + @GuardedBy boolean test(@GuardedBy Predicate<@GuardedBy String> this, @GuardedBy String p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ModifiedControlVariableCheck.java + methodref.receiver.bound + Incompatible receiver type + return initializedVariables.stream().filter(iteratingVariables::contains) +
+ found : @GuardedBy Set<@GuardedBy String> + required: @GuardSatisfied Set<@GuardedBy String> + Consequence: method + @GuardedBy Set<@GuardedBy String> + is not a valid method reference for method in @GuardedBy Set<@GuardedBy String> + @GuardedBy boolean contains(@GuardSatisfied Set<@GuardedBy String> this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + methodref.receiver.bound + Incompatible receiver type + instAndClassVarDeque.forEach(variablesStack::push); +
+ found : @GuardedBy Deque<@GuardedBy VariableDesc> + required: @GuardSatisfied Deque<@GuardedBy VariableDesc> + Consequence: method + @GuardedBy Deque<@GuardedBy VariableDesc> + is not a valid method reference for method in @GuardedBy Deque<@GuardedBy VariableDesc> + void push(@GuardSatisfied Deque<@GuardedBy VariableDesc> this, @GuardedBy VariableDesc p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java + methodref.receiver + Incompatible receiver type + .map(Map.Entry::getValue) +
+ found : @GuardSatisfied Entry<@GuardedBy String, @GuardedBy ClassDesc> + required: @GuardedBy Entry<@GuardedBy String, @GuardedBy ClassDesc> + Consequence: method in @GuardedBy Entry<@GuardedBy String, @GuardedBy ClassDesc> + @GuardedBy ClassDesc getValue(@GuardSatisfied Entry<@GuardedBy String, @GuardedBy ClassDesc> this) + is not a valid method reference for method in @GuardedBy Function<@GuardedBy Entry<@GuardedBy String, @GuardedBy ClassDesc>, @GuardedBy ClassDesc> + @GuardedBy ClassDesc apply(@GuardedBy Function<@GuardedBy Entry<@GuardedBy String, @GuardedBy ClassDesc>, @GuardedBy ClassDesc> this, @GuardedBy Entry<@GuardedBy String, @GuardedBy ClassDesc> p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java + method.guarantee.violated + @SideEffectFree method toString calls method append with a weaker @ReleasesNoLocks side effect guarantee + sb.append(", "); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java + method.guarantee.violated + @SideEffectFree method toString calls method append with a weaker @ReleasesNoLocks side effect guarantee + sb.append(i); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy IndentLevel + required: @GuardSatisfied Object + Consequence: method in @GuardedBy IndentLevel + @GuardedBy String toString(@GuardedBy IndentLevel this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/HtmlTag.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy HtmlTag + required: @GuardSatisfied Object + Consequence: method in @GuardedBy HtmlTag + @GuardedBy String toString(@GuardedBy HtmlTag this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy Token + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Token + @GuardedBy String toString(@GuardedBy Token this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocNodeImpl.java + method.guarantee.violated + @SideEffectFree method toString calls method getTokenName with a weaker @ReleasesNoLocks side effect guarantee + + ", type=" + JavadocUtil.getTokenName(type) + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocNodeImpl.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy JavadocNodeImpl + required: @GuardSatisfied Object + Consequence: method in @GuardedBy JavadocNodeImpl + @GuardedBy String toString(@GuardedBy JavadocNodeImpl this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTag.java + method.guarantee.violated + @SideEffectFree method toString calls method getName with a weaker @ReleasesNoLocks side effect guarantee + return "JavadocTag[tag='" + tagInfo.getName() + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTag.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy JavadocTag + required: @GuardSatisfied Object + Consequence: method in @GuardedBy JavadocTag + @GuardedBy String toString(@GuardedBy JavadocTag this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTagInfo.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy JavadocTagInfo + required: @GuardSatisfied Object + Consequence: method in @GuardedBy JavadocTagInfo + @GuardedBy String toString(@GuardedBy JavadocTagInfo this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java + methodref.receiver.bound + Incompatible receiver type + .forEach(excludeClassesRegexps::add); +
+ found : @GuardedBy List<@GuardedBy Pattern> + required: @GuardSatisfied List<@GuardedBy Pattern> + Consequence: method + @GuardedBy List<@GuardedBy Pattern> + is not a valid method reference for method in @GuardedBy List<@GuardedBy Pattern> + @GuardedBy boolean add(@GuardSatisfied List<@GuardedBy Pattern> this, @GuardedBy Pattern p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AccessModifierOption.java + method.guarantee.violated + @SideEffectFree method toString calls method getName with a weaker @ReleasesNoLocks side effect guarantee + return getName(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AccessModifierOption.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy AccessModifierOption + required: @GuardSatisfied Object + Consequence: method in @GuardedBy AccessModifierOption + @GuardedBy String toString(@GuardedBy AccessModifierOption this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java + methodref.param + Incompatible parameter type for obj + node.getLastChild(), Objects::nonNull, DetailAST::getPreviousSibling +
+ found : @GuardSatisfied Object + required: @GuardedBy DetailAST + Consequence: method in @GuardedBy Objects + @GuardedBy boolean nonNull(@GuardSatisfied Object p0) + is not a valid method reference for method in @GuardedBy Predicate<@GuardedBy DetailAST> + @GuardedBy boolean test(@GuardedBy Predicate<@GuardedBy DetailAST> this, @GuardedBy DetailAST p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/CsvFilterElement.java + override.param + Incompatible parameter type for object. + public boolean equals(Object object) { +
+ found : @GuardedBy Object + required: @GuardSatisfied Object + Consequence: method in @GuardedBy CsvFilterElement + @GuardedBy boolean equals(@GuardedBy CsvFilterElement this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/CsvFilterElement.java + override.receiver + Incompatible receiver type + public boolean equals(Object object) { +
+ found : @GuardedBy CsvFilterElement + required: @GuardSatisfied Object + Consequence: method in @GuardedBy CsvFilterElement + @GuardedBy boolean equals(@GuardedBy CsvFilterElement this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/CsvFilterElement.java + override.receiver + Incompatible receiver type + public int hashCode() { +
+ found : @GuardedBy CsvFilterElement + required: @GuardSatisfied Object + Consequence: method in @GuardedBy CsvFilterElement + @GuardedBy int hashCode(@GuardedBy CsvFilterElement this) + cannot override method in @GuardedBy Object + @GuardedBy int hashCode(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilterElement.java + method.guarantee.violated + @Pure method hashCode calls method valueOf with a weaker @SideEffectFree side effect guarantee + return Integer.valueOf(matchValue).hashCode(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilterElement.java + override.param + Incompatible parameter type for object. + public final boolean equals(Object object) { +
+ found : @GuardedBy Object + required: @GuardSatisfied Object + Consequence: method in @GuardedBy IntMatchFilterElement + @GuardedBy boolean equals(@GuardedBy IntMatchFilterElement this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilterElement.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy IntMatchFilterElement + required: @GuardSatisfied Object + Consequence: method in @GuardedBy IntMatchFilterElement + @GuardedBy String toString(@GuardedBy IntMatchFilterElement this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilterElement.java + override.receiver + Incompatible receiver type + public final boolean equals(Object object) { +
+ found : @GuardedBy IntMatchFilterElement + required: @GuardSatisfied Object + Consequence: method in @GuardedBy IntMatchFilterElement + @GuardedBy boolean equals(@GuardedBy IntMatchFilterElement this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilterElement.java + override.receiver + Incompatible receiver type + public final int hashCode() { +
+ found : @GuardedBy IntMatchFilterElement + required: @GuardSatisfied Object + Consequence: method in @GuardedBy IntMatchFilterElement + @GuardedBy int hashCode(@GuardedBy IntMatchFilterElement this) + cannot override method in @GuardedBy Object + @GuardedBy int hashCode(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilterElement.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @GuardedBy Object + required: @GuardSatisfied Object + Consequence: method in @GuardedBy IntRangeFilterElement + @GuardedBy boolean equals(@GuardedBy IntRangeFilterElement this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilterElement.java + override.receiver + Incompatible receiver type + public boolean equals(Object other) { +
+ found : @GuardedBy IntRangeFilterElement + required: @GuardSatisfied Object + Consequence: method in @GuardedBy IntRangeFilterElement + @GuardedBy boolean equals(@GuardedBy IntRangeFilterElement this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilterElement.java + override.receiver + Incompatible receiver type + public int hashCode() { +
+ found : @GuardedBy IntRangeFilterElement + required: @GuardSatisfied Object + Consequence: method in @GuardedBy IntRangeFilterElement + @GuardedBy int hashCode(@GuardedBy IntRangeFilterElement this) + cannot override method in @GuardedBy Object + @GuardedBy int hashCode(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @GuardedBy Object + required: @GuardSatisfied Object + Consequence: method in @GuardedBy SuppressFilterElement + @GuardedBy boolean equals(@GuardedBy SuppressFilterElement this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + override.receiver + Incompatible receiver type + public boolean equals(Object other) { +
+ found : @GuardedBy SuppressFilterElement + required: @GuardSatisfied Object + Consequence: method in @GuardedBy SuppressFilterElement + @GuardedBy boolean equals(@GuardedBy SuppressFilterElement this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + override.receiver + Incompatible receiver type + public int hashCode() { +
+ found : @GuardedBy SuppressFilterElement + required: @GuardSatisfied Object + Consequence: method in @GuardedBy SuppressFilterElement + @GuardedBy int hashCode(@GuardedBy SuppressFilterElement this) + cannot override method in @GuardedBy Object + @GuardedBy int hashCode(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @GuardedBy Object + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Tag + @GuardedBy boolean equals(@GuardedBy Tag this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy Tag + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Tag + @GuardedBy String toString(@GuardedBy Tag this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + override.receiver + Incompatible receiver type + public boolean equals(Object other) { +
+ found : @GuardedBy Tag + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Tag + @GuardedBy boolean equals(@GuardedBy Tag this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + override.receiver + Incompatible receiver type + public int hashCode() { +
+ found : @GuardedBy Tag + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Tag + @GuardedBy int hashCode(@GuardedBy Tag this) + cannot override method in @GuardedBy Object + @GuardedBy int hashCode(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @GuardedBy Object + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Suppression + @GuardedBy boolean equals(@GuardedBy Suppression this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + override.receiver + Incompatible receiver type + public boolean equals(Object other) { +
+ found : @GuardedBy Suppression + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Suppression + @GuardedBy boolean equals(@GuardedBy Suppression this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + override.receiver + Incompatible receiver type + public int hashCode() { +
+ found : @GuardedBy Suppression + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Suppression + @GuardedBy int hashCode(@GuardedBy Suppression this) + cannot override method in @GuardedBy Object + @GuardedBy int hashCode(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @GuardedBy Object + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Tag + @GuardedBy boolean equals(@GuardedBy Tag this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy Tag + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Tag + @GuardedBy String toString(@GuardedBy Tag this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + override.receiver + Incompatible receiver type + public boolean equals(Object other) { +
+ found : @GuardedBy Tag + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Tag + @GuardedBy boolean equals(@GuardedBy Tag this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + override.receiver + Incompatible receiver type + public int compareTo(Tag object) { +
+ found : @GuardedBy Tag + required: @GuardSatisfied Comparable<@GuardedBy Tag> + Consequence: method in @GuardedBy Tag + @GuardedBy int compareTo(@GuardedBy Tag this, @GuardedBy Tag p0) + cannot override method in @GuardedBy Comparable<@GuardedBy Tag> + @GuardedBy int compareTo(@GuardSatisfied Comparable<@GuardedBy Tag> this, @GuardedBy Tag p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + override.receiver + Incompatible receiver type + public int hashCode() { +
+ found : @GuardedBy Tag + required: @GuardSatisfied Object + Consequence: method in @GuardedBy Tag + @GuardedBy int hashCode(@GuardedBy Tag this) + cannot override method in @GuardedBy Object + @GuardedBy int hashCode(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathFilter.java + override.param + Incompatible parameter type for obj. + public boolean equals(Object obj) { +
+ found : @GuardedBy Object + required: @GuardSatisfied Object + Consequence: method in @GuardedBy SuppressionXpathFilter + @GuardedBy boolean equals(@GuardedBy SuppressionXpathFilter this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathFilter.java + override.receiver + Incompatible receiver type + public boolean equals(Object obj) { +
+ found : @GuardedBy SuppressionXpathFilter + required: @GuardSatisfied Object + Consequence: method in @GuardedBy SuppressionXpathFilter + @GuardedBy boolean equals(@GuardedBy SuppressionXpathFilter this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathFilter.java + override.receiver + Incompatible receiver type + public int hashCode() { +
+ found : @GuardedBy SuppressionXpathFilter + required: @GuardSatisfied Object + Consequence: method in @GuardedBy SuppressionXpathFilter + @GuardedBy int hashCode(@GuardedBy SuppressionXpathFilter this) + cannot override method in @GuardedBy Object + @GuardedBy int hashCode(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @GuardedBy Object + required: @GuardSatisfied Object + Consequence: method in @GuardedBy XpathFilterElement + @GuardedBy boolean equals(@GuardedBy XpathFilterElement this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + override.receiver + Incompatible receiver type + public boolean equals(Object other) { +
+ found : @GuardedBy XpathFilterElement + required: @GuardSatisfied Object + Consequence: method in @GuardedBy XpathFilterElement + @GuardedBy boolean equals(@GuardedBy XpathFilterElement this, @GuardedBy Object p0) + cannot override method in @GuardedBy Object + @GuardedBy boolean equals(@GuardSatisfied Object this, @GuardSatisfied Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + override.receiver + Incompatible receiver type + public int hashCode() { +
+ found : @GuardedBy XpathFilterElement + required: @GuardSatisfied Object + Consequence: method in @GuardedBy XpathFilterElement + @GuardedBy int hashCode(@GuardedBy XpathFilterElement this) + cannot override method in @GuardedBy Object + @GuardedBy int hashCode(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrameModel.java + override.receiver + Incompatible receiver type + public String toString() { +
+ found : @GuardedBy ParseMode + required: @GuardSatisfied Object + Consequence: method in @GuardedBy ParseMode + @GuardedBy String toString(@GuardedBy ParseMode this) + cannot override method in @GuardedBy Object + @GuardedBy String toString(@GuardSatisfied Object this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/TokenUtil.java + methodref.receiver + Incompatible receiver type + .collect(BitSet::new, BitSet::set, BitSet::or); +
+ found : @GuardSatisfied BitSet + required: @GuardedBy BitSet + Consequence: method in @GuardedBy BitSet + void or(@GuardSatisfied BitSet this, @GuardedBy BitSet p0) + is not a valid method reference for method in @GuardedBy BiConsumer<@GuardedBy BitSet, @GuardedBy BitSet> + void accept(@GuardedBy BiConsumer<@GuardedBy BitSet, @GuardedBy BitSet> this, @GuardedBy BitSet p0, @GuardedBy BitSet p1) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/TokenUtil.java + methodref.receiver + Incompatible receiver type + .collect(BitSet::new, BitSet::set, BitSet::or); +
+ found : @GuardSatisfied BitSet + required: @GuardedBy BitSet + Consequence: method in @GuardedBy BitSet + void set(@GuardSatisfied BitSet this, @GuardedBy int p0) + is not a valid method reference for method in @GuardedBy ObjIntConsumer<@GuardedBy BitSet> + void accept(@GuardedBy ObjIntConsumer<@GuardedBy BitSet> this, @GuardedBy BitSet p0, @GuardedBy int p1) +
+
+
diff --git a/.ci/checker-framework-suppressions/checker-framework-methods-resource-fenum-suppressions.xml b/.ci/checker-framework-suppressions/checker-framework-methods-resource-fenum-suppressions.xml new file mode 100644 index 00000000000..09200c6acf9 --- /dev/null +++ b/.ci/checker-framework-suppressions/checker-framework-methods-resource-fenum-suppressions.xml @@ -0,0 +1,344 @@ + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + required.method.not.called + @MustCall method close may not have been invoked on out or any of its aliases. + final OutputStream out = getOutputStream(outputLocation); +
+ The type of object is: java.io.OutputStream. + Reason for going out of scope: possible exceptional exit due to format.createListener(out, closeOutputStreamOption) with exception type java.io.IOException +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-10288 or any of its aliases. + listener = new XpathFileGeneratorAuditListener(getOutputStream(options.outputPath), +
+ The type of object is: java.io.OutputStream. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java + return + incompatible types in return. + return instance; +
+ type of expression: @FenumTop Object + method return type: @FenumUnqualified Object +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XmlLoader.java + required.method.not.called + @MustCall method close may not have been invoked on dtdIs or any of its aliases. + final InputStream dtdIs = +
+ The type of object is: java.io.InputStream. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + required.method.not.called + @MustCall method close may not have been invoked on debug or any of its aliases. + final OutputStream debug = new LogOutputStream(this, Project.MSG_DEBUG); +
+ The type of object is: java.io.OutputStream. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + required.method.not.called + @MustCall method close may not have been invoked on err or any of its aliases. + final OutputStream err = new LogOutputStream(this, Project.MSG_ERR); +
+ The type of object is: java.io.OutputStream. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + required.method.not.called + @MustCall method close may not have been invoked on infoStream or any of its aliases. + final OutputStream infoStream = Files.newOutputStream(toFile.toPath()); +
+ The type of object is: java.io.OutputStream. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-20912 or any of its aliases. + sarifLogger = new SarifLogger(new LogOutputStream(task, Project.MSG_INFO), +
+ The type of object is: org.apache.tools.ant.taskdefs.LogOutputStream. + Reason for going out of scope: possible exceptional exit due to new SarifLogger(new LogOutputStream(task, Project.MSG_INFO), AutomaticBean.OutputStreamOptions.CLOSE) with exception type java.io.IOException +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-20915 or any of its aliases. + sarifLogger = new SarifLogger(Files.newOutputStream(toFile.toPath()), +
+ The type of object is: java.io.OutputStream. + Reason for going out of scope: possible exceptional exit due to new SarifLogger(Files.newOutputStream(toFile.toPath()), AutomaticBean.OutputStreamOptions.CLOSE) with exception type java.io.IOException +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-20917 or any of its aliases. + new LogOutputStream(task, Project.MSG_DEBUG), +
+ The type of object is: org.apache.tools.ant.taskdefs.LogOutputStream. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-20918 or any of its aliases. + new LogOutputStream(task, Project.MSG_ERR), +
+ The type of object is: org.apache.tools.ant.taskdefs.LogOutputStream. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-20923 or any of its aliases. + xmlLogger = new XMLLogger(new LogOutputStream(task, Project.MSG_INFO), +
+ The type of object is: org.apache.tools.ant.taskdefs.LogOutputStream. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-20926 or any of its aliases. + xmlLogger = new XMLLogger(Files.newOutputStream(toFile.toPath()), +
+ The type of object is: java.io.OutputStream. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + return + incompatible types in return. + return resultHandler; +
+ type of expression: @FenumTop AbstractExpressionHandler + method return type: @FenumUnqualified AbstractExpressionHandler +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + return + incompatible types in return. + return resultHandler; +
+ type of expression: @MustCallUnknown AbstractExpressionHandler + method return type: @MustCall AbstractExpressionHandler +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + argument + incompatible argument for parameter horizontalAlignment of JLabel. + final JLabel modesLabel = new JLabel("Modes:", SwingConstants.RIGHT); +
+ found : @SwingHorizontalOrientation int + required: @FenumUnqualified int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-23288 or any of its aliases. + moduleDetails = read(XmlMetaReader.class.getResourceAsStream("/" + fileName), +
+ The type of object is: java.io.InputStream. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/AbstractNode.java + required.method.not.called + @MustCall method close may not have been invoked on axisIterator or any of its aliases. + AxisIterator axisIterator = iterateAxis(axisNumber); +
+ The type of object is: net.sf.saxon.tree.iter.AxisIterator. + Reason for going out of scope: variable overwritten by assignment axisIterator = new Navigator.AxisFilter(axisIterator, nodeTest) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/DescendantIterator.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-20533 or any of its aliases. + descendantEnum = SingleNodeIterator.makeIterator(start); +
+ The type of object is: net.sf.saxon.tree.iter.AxisIterator. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/DescendantIterator.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-20534 or any of its aliases. + descendantEnum = start.iterateAxis(AxisInfo.CHILD); +
+ The type of object is: net.sf.saxon.tree.iter.AxisIterator. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/DescendantIterator.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-20536 or any of its aliases. + descendantEnum = queue.poll().iterateAxis(AxisInfo.CHILD); +
+ The type of object is: net.sf.saxon.tree.iter.AxisIterator. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/FollowingIterator.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-20414 or any of its aliases. + ancestorEnum = start.iterateAxis(AxisInfo.ANCESTOR); +
+ The type of object is: net.sf.saxon.tree.iter.AxisIterator. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/FollowingIterator.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-20415 or any of its aliases. + siblingEnum = start.iterateAxis(AxisInfo.FOLLOWING_SIBLING); +
+ The type of object is: net.sf.saxon.tree.iter.AxisIterator. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/FollowingIterator.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-20418 or any of its aliases. + descendantEnum = result.iterateAxis(AxisInfo.DESCENDANT); +
+ The type of object is: net.sf.saxon.tree.iter.AxisIterator. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/FollowingIterator.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-20420 or any of its aliases. + siblingEnum = parent.iterateAxis(AxisInfo.FOLLOWING_SIBLING); +
+ The type of object is: net.sf.saxon.tree.iter.AxisIterator. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/PrecedingIterator.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-10345 or any of its aliases. + ancestorEnum = start.iterateAxis(AxisInfo.ANCESTOR); +
+ The type of object is: net.sf.saxon.tree.iter.AxisIterator. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/PrecedingIterator.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-10346 or any of its aliases. + previousSiblingEnum = start.iterateAxis(AxisInfo.PRECEDING_SIBLING); +
+ The type of object is: net.sf.saxon.tree.iter.AxisIterator. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/PrecedingIterator.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-10349 or any of its aliases. + descendantEnum = new ReverseDescendantIterator(result); + +
+ The type of object is: com.puppycrawl.tools.checkstyle.xpath.iterators.ReverseDescendantIterator. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/PrecedingIterator.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-10351 or any of its aliases. + previousSiblingEnum = result.iterateAxis(AxisInfo.PRECEDING_SIBLING); +
+ The type of object is: net.sf.saxon.tree.iter.AxisIterator. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/ReverseDescendantIterator.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-22037 or any of its aliases. + pushToStack(start.iterateAxis(AxisInfo.CHILD)); +
+ The type of object is: net.sf.saxon.tree.iter.AxisIterator. + Reason for going out of scope: regular method exit +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/ReverseDescendantIterator.java + required.method.not.called + @MustCall method close may not have been invoked on temp-var-22043 or any of its aliases. + pushToStack(queue.poll().iterateAxis(AxisInfo.CHILD)); +
+ The type of object is: net.sf.saxon.tree.iter.AxisIterator. + Reason for going out of scope: regular method exit +
+
+
diff --git a/.ci/checker-framework-suppressions/checker-framework-nullness-optional-interning-suppressions.xml b/.ci/checker-framework-suppressions/checker-framework-nullness-optional-interning-suppressions.xml new file mode 100644 index 00000000000..32b03a9e690 --- /dev/null +++ b/.ci/checker-framework-suppressions/checker-framework-nullness-optional-interning-suppressions.xml @@ -0,0 +1,6090 @@ + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java + argument + incompatible argument for parameter args of Violation. + new String[] {ioe.getMessage()}, null, getClass(), null)); +
+ found : @Initialized @Nullable String @Initialized @NonNull [] + required: @Initialized @NonNull Object @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java + argument + incompatible argument for parameter customMessage of Violation. + new String[] {ioe.getMessage()}, null, getClass(), null)); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java + argument + incompatible argument for parameter customMessage of Violation. + null, getClass(), null)); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java + argument + incompatible argument for parameter moduleId of Violation. + new String[] {ioe.getMessage()}, null, getClass(), null)); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java + argument + incompatible argument for parameter moduleId of Violation. + null, getClass(), null)); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java + assignment + incompatible types in assignment. + fileExtensions = null; +
+ found : null (NullType) + required: @Initialized @NonNull String @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java + initialization.fields.uninitialized + the constructor does not initialize fields: basedir, moduleFactory, moduleClassLoader, childContext, cacheFile + public Checker() { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java + method.invocation + call to addListener(com.puppycrawl.tools.checkstyle.api.AuditListener) not allowed on the given receiver. + addListener(counter); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.api.AutomaticBean.class) @NonNull Checker + required: @Initialized @NonNull Checker +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java + argument + incompatible argument for parameter arg0 of add. + fragments.add(null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java + dereference.of.nullable + dereference of possibly-null reference parentModule + parentModule.removeChild(recentModule); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java + dereference.of.nullable + dereference of possibly-null reference top + top.addChild(conf); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java + dereference.of.nullable + dereference of possibly-null reference top + top.addMessage(key, value); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java + dereference.of.nullable + dereference of possibly-null reference top + top.addProperty(name, value); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java + initialization.fields.uninitialized + the constructor does not initialize fields: configuration + private ConfigurationLoader(final PropertyResolver overrideProps, + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DefaultConfiguration.java + return + incompatible types in return. + return children.toArray( +
+ type of expression: @Initialized @Nullable Configuration @Initialized @NonNull [] + method return type: @Initialized @NonNull Configuration @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DefaultConfiguration.java + return + incompatible types in return. + return keySet.toArray(CommonUtil.EMPTY_STRING_ARRAY); +
+ type of expression: @Initialized @Nullable String @Initialized @NonNull [] + method return type: @Initialized @NonNull String @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DefaultConfiguration.java + toarray.nullable.elements.not.newarray + call of toArray on collection of non-null elements yields an array of possibly-null elements; omit the argument to toArray or make it an explicit array constructor + return children.toArray( + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DefaultConfiguration.java + toarray.nullable.elements.not.newarray + call of toArray on collection of non-null elements yields an array of possibly-null elements; omit the argument to toArray or make it an explicit array constructor + return keySet.toArray(CommonUtil.EMPTY_STRING_ARRAY); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DefaultContext.java + return + incompatible types in return. + return entries.get(key); +
+ type of expression: @Initialized @Nullable Object + method return type: @Initialized @NonNull Object +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java + argument + incompatible argument for parameter loader of getBundle. + name, LOCALE, LocalizedMessage.class.getClassLoader(), +
+ found : @Initialized @Nullable ClassLoader + required: @Initialized @NonNull ClassLoader +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java + assignment + incompatible types in assignment. + args = null; +
+ found : null (NullType) + required: @Initialized @NonNull String @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java + assignment + incompatible types in assignment. + this.args = null; +
+ found : null (NullType) + required: @Initialized @NonNull String @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + assignment + incompatible types in assignment. + firstChild = null; +
+ found : null (NullType) + required: @Initialized @NonNull DetailAstImpl +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + assignment + incompatible types in assignment. + prevParent.branchTokenTypes = null; +
+ found : null (NullType) + required: @Initialized @NonNull BitSet +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + initialization.field.uninitialized + the default constructor does not initialize field branchTokenTypes + private BitSet branchTokenTypes; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + initialization.field.uninitialized + the default constructor does not initialize field firstChild + private DetailAstImpl firstChild; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + initialization.field.uninitialized + the default constructor does not initialize field hiddenAfter + private List<Token> hiddenAfter; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + initialization.field.uninitialized + the default constructor does not initialize field hiddenBefore + private List<Token> hiddenBefore; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + initialization.field.uninitialized + the default constructor does not initialize field nextSibling + private DetailAstImpl nextSibling; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + initialization.field.uninitialized + the default constructor does not initialize field parent + private DetailAstImpl parent; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + initialization.field.uninitialized + the default constructor does not initialize field previousSibling + private DetailAstImpl previousSibling; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + initialization.field.uninitialized + the default constructor does not initialize field text + private String text; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + return + incompatible types in return. + return returnList; +
+ type of expression: @Initialized @Nullable List<@Initialized @NonNull Token> + method return type: @Initialized @NonNull List<@Initialized @NonNull Token> +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java + return + incompatible types in return. + return returnValue; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DetailNodeTreeStringPrinter.java + argument + incompatible argument for parameter customMessage of Violation. + null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java + argument + incompatible argument for parameter child of addChild. + bop.addChild(descendantList.poll()); +
+ found : @Initialized @Nullable DetailAstImpl + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java + initialization.field.uninitialized + the default constructor does not initialize field child + private DetailAstImpl child; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java + initialization.field.uninitialized + the default constructor does not initialize field root + private DetailAstImpl root; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java + introduce.eliminate + It is bad style to create an Optional just to chain methods to get a value. + .orElseGet(() -> createImaginary(TokenTypes.ELIST)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java + introduce.eliminate + It is bad style to create an Optional just to chain methods to get a value. + .orElseGet(() -> createImaginary(TokenTypes.PARAMETERS)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java + not.interned + attempting to use a non-@Interned comparison operand + else if (ctx.children.get(i) == expression) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java + not.interned + attempting to use a non-@Interned comparison operand + if (ctx.children.get(i) == rbrack) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java + return + incompatible types in return. + return annotations; +
+ type of expression: @Initialized @Nullable DetailAstImpl + method return type: @Initialized @NonNull DetailAstImpl +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java + return + incompatible types in return. + return ast; +
+ type of expression: @Initialized @Nullable DetailAstImpl + method return type: @Initialized @NonNull DetailAstImpl +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java + return + incompatible types in return. + return compilationUnit; +
+ type of expression: @Initialized @Nullable DetailAstImpl + method return type: @Initialized @NonNull DetailAstImpl +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + argument + incompatible argument for parameter parent of createJavadocNode. + final JavadocNodeImpl rootJavadocNode = createJavadocNode(parseTreeNode, null, -1); +
+ found : null (NullType) + required: @Initialized @NonNull DetailNode +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + dereference.of.nullable + dereference of possibly-null reference stack.peek() + if (stack.peek().getText().equals(token.getText())) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + initialization.field.uninitialized + the default constructor does not initialize field errorMessage + private ParseErrorMessage errorMessage; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + initialization.field.uninitialized + the default constructor does not initialize field firstNonTightHtmlTag + private Token firstNonTightHtmlTag; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + initialization.field.uninitialized + the default constructor does not initialize field parseErrorMessage + private ParseErrorMessage parseErrorMessage; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + initialization.field.uninitialized + the default constructor does not initialize field tree + private DetailNode tree; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + return + incompatible types in return. + return nextSibling; +
+ type of expression: @Initialized @Nullable ParseTree + method return type: @Initialized @NonNull ParseTree +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocDetailNodeParser.java + return + incompatible types in return. + return offendingToken; +
+ type of expression: @Initialized @Nullable CommonToken + method return type: @Initialized @NonNull Token +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocPropertiesGenerator.java + initialization.field.uninitialized + the default constructor does not initialize field inputFile + private File inputFile; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocPropertiesGenerator.java + initialization.field.uninitialized + the default constructor does not initialize field outputFile + private File outputFile; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocPropertiesGenerator.java + return + incompatible types in return. + return firstSentence; +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/JavadocPropertiesGenerator.java + return + incompatible types in return. + return objBlock; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + argument + incompatible argument for parameter customMessage of Violation. + new String[] {String.valueOf(errorCounter)}, null, Main.class, null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + argument + incompatible argument for parameter customMessage of Violation. + new String[] {file.getAbsolutePath()}, null, Main.class, null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + argument + incompatible argument for parameter moduleClassLoader of getRootModule. + final RootModule rootModule = getRootModule(config.getName(), moduleClassLoader); +
+ found : @Initialized @Nullable ClassLoader + required: @Initialized @NonNull ClassLoader +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + argument + incompatible argument for parameter moduleId of Violation. + new String[] {String.valueOf(errorCounter)}, null, Main.class, null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + argument + incompatible argument for parameter moduleId of Violation. + new String[] {file.getAbsolutePath()}, null, Main.class, null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + dereference.of.nullable + dereference of possibly-null reference Checker.class.getPackage() + Checker.class.getPackage().getName(), moduleClassLoader); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + dereference.of.nullable + dereference of possibly-null reference Main.class.getPackage() + + Main.class.getPackage().getImplementationVersion()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + dereference.of.nullable + dereference of possibly-null reference Main.class.getPackage() + private final String packageName = Main.class.getPackage().getName(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + dereference.of.nullable + dereference of possibly-null reference Main.class.getPackage() + return "Checkstyle version: " + Main.class.getPackage().getImplementationVersion(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + dereference.of.nullable + dereference of possibly-null reference logRecord.getLoggerName() + return logRecord.getLoggerName().startsWith(packageName); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + dereference.of.nullable + dereference of possibly-null reference parentLogger + parentLogger.addHandler(handler); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + initialization.field.uninitialized + the default constructor does not initialize field configurationFile + private String configurationFile; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + initialization.field.uninitialized + the default constructor does not initialize field files + private List<File> files; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + initialization.field.uninitialized + the default constructor does not initialize field outputPath + private Path outputPath; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + initialization.field.uninitialized + the default constructor does not initialize field propertiesFile + private File propertiesFile; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + initialization.field.uninitialized + the default constructor does not initialize field suppressionLineColumnNumber + private String suppressionLineColumnNumber; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + initialization.field.uninitialized + the default constructor does not initialize field xpath + private String xpath; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable Configuration + method return type: @Initialized @NonNull Configuration +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java + argument + incompatible argument for parameter arg0 of contains. + if (packageNames.contains(null)) { +
+ found : null (NullType) + required: @Initialized @NonNull Object +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java + argument + incompatible argument for parameter args of Violation. + new String[] {name, attemptedNames}, null, getClass(), null); +
+ found : @Initialized @Nullable String @Initialized @NonNull [] + required: @Initialized @NonNull Object @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java + argument + incompatible argument for parameter customMessage of Violation. + new String[] {name, attemptedNames}, null, getClass(), null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java + argument + incompatible argument for parameter customMessage of Violation. + new String[] {name, optionalNames}, null, getClass(), null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java + argument + incompatible argument for parameter moduleId of Violation. + new String[] {name, attemptedNames}, null, getClass(), null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java + argument + incompatible argument for parameter moduleId of Violation. + new String[] {name, optionalNames}, null, getClass(), null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java + initialization.fields.uninitialized + the constructor does not initialize fields: thirdPartyNameToFullModuleNames + public PackageObjectFactory(Set<String> packageNames, ClassLoader moduleClassLoader, + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java + initialization.fields.uninitialized + the constructor does not initialize fields: thirdPartyNameToFullModuleNames, moduleLoadOption + public PackageObjectFactory(String packageName, ClassLoader moduleClassLoader) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java + methodref.return + Incompatible return type + Collectors.mapping(Class::getCanonicalName, Collectors.toSet()))); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String + Consequence: method in @Initialized @NonNull Class</*INFERENCE FAILED for:*/ ? extends @Initialized @NonNull Object> + @Initialized @Nullable String getCanonicalName(@Initialized @NonNull Class</*INFERENCE FAILED for:*/ ? extends @Initialized @NonNull Object> this) + is not a valid method reference for method in @Initialized @NonNull Function</*INFERENCE FAILED for:*/ ? extends @Initialized @Nullable Object, @Initialized @NonNull String> + @Initialized @NonNull String apply(@Initialized @NonNull Function</*INFERENCE FAILED for:*/ ? extends @Initialized @Nullable Object, @Initialized @NonNull String> this, /*INFERENCE FAILED for:*/ ? extends @Initialized @Nullable Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java + return + incompatible types in return. + return instance; +
+ type of expression: @Initialized @Nullable Object + method return type: @Initialized @NonNull Object +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertiesExpander.java + methodref.return + Incompatible return type + .collect(Collectors.toMap(Function.identity(), properties::getProperty)); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String + Consequence: method in @Initialized @NonNull Properties + @Initialized @Nullable String getProperty(@Initialized @NonNull Properties this, @Initialized @NonNull String p0) + is not a valid method reference for method in @Initialized @NonNull Function</*INFERENCE FAILED for:*/ ? extends @Initialized @Nullable Object, @Initialized @NonNull String> + @Initialized @NonNull String apply(@Initialized @NonNull Function</*INFERENCE FAILED for:*/ ? extends @Initialized @Nullable Object, @Initialized @NonNull String> this, /*INFERENCE FAILED for:*/ ? extends @Initialized @Nullable Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertiesExpander.java + return + incompatible types in return. + return values.get(name); +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java + dereference.of.nullable + dereference of possibly-null reference cachedHashSum + if (!cachedHashSum.equals(contentHashSum)) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java + initialization.fields.uninitialized + the constructor does not initialize fields: configHash + public PropertyCacheFile(Configuration config, String fileName) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java + return + incompatible types in return. + return details.getProperty(name); +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/SarifLogger.java + dereference.of.nullable + dereference of possibly-null reference SarifLogger.class.getPackage() + final String version = SarifLogger.class.getPackage().getImplementationVersion(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/SuppressionsStringPrinter.java + argument + incompatible argument for parameter s of parseInt. + final int columnNumber = Integer.parseInt(matcher.group(2)); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/SuppressionsStringPrinter.java + argument + incompatible argument for parameter s of parseInt. + final int lineNumber = Integer.parseInt(matcher.group(1)); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java + initialization.fields.uninitialized + the constructor does not initialize fields: childContext, moduleFactory + public TreeWalker() { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java + method.invocation + call to setFileExtensions(java.lang.String...) not allowed on the given receiver. + setFileExtensions("java"); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck.class) @NonNull AbstractFileSetCheck + required: @Initialized @NonNull AbstractFileSetCheck +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java + return + incompatible types in return. + return visitors; +
+ type of expression: @Initialized @Nullable Collection<@Initialized @NonNull AbstractCheck> + method return type: @Initialized @NonNull Collection<@Initialized @NonNull AbstractCheck> +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java + argument + incompatible argument for parameter messages of writeFileMessages. + writeFileMessages(fileName, messages); +
+ found : @Initialized @Nullable FileMessages + required: @Initialized @NonNull FileMessages +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java + dereference.of.nullable + dereference of possibly-null reference XMLLogger.class.getPackage() + final String version = XMLLogger.class.getPackage().getImplementationVersion(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XmlLoader.java + argument + incompatible argument for parameter byteStream of InputSource. + inputSource = new InputSource(dtdIs); +
+ found : @Initialized @Nullable InputStream + required: @Initialized @NonNull InputStream +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XmlLoader.java + argument + incompatible argument for parameter handler of createXmlReader. + parser = createXmlReader(this); +
+ found : @UnderInitialization(org.xml.sax.helpers.DefaultHandler.class) @NonNull XmlLoader + required: @Initialized @NonNull DefaultHandler +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XmlLoader.java + dereference.of.nullable + dereference of possibly-null reference loader + loader.getResourceAsStream(dtdResourceName); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XmlLoader.java + override.param + Incompatible parameter type for publicId. + public InputSource resolveEntity(String publicId, String systemId) +
+ found : @Initialized @NonNull String + required: @Initialized @Nullable String + Consequence: method in @Initialized @NonNull XmlLoader + @Initialized @NonNull InputSource resolveEntity(@Initialized @NonNull XmlLoader this, @Initialized @NonNull String p0, @Initialized @NonNull String p1) throws @Initialized @NonNull SAXException@Initialized @NonNull IOException + cannot override method in @Initialized @NonNull EntityResolver + @Initialized @Nullable InputSource resolveEntity(@Initialized @NonNull EntityResolver this, @Initialized @Nullable String p0, @Initialized @NonNull String p1) throws @Initialized @NonNull SAXException@Initialized @NonNull IOException +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/XpathFileGeneratorAstFilter.java + return + incompatible types in return. + return MESSAGE_QUERY_MAP.get(event.getViolation()); +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + argument + incompatible argument for parameter checkstyleVersion of realExecute. + realExecute(version); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + argument + incompatible argument for parameter moduleClassLoader of PackageObjectFactory. + Checker.class.getPackage().getName() + ".", moduleClassLoader); +
+ found : @Initialized @Nullable ClassLoader + required: @Initialized @NonNull ClassLoader +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + argument + incompatible argument for parameter moduleClassLoader of setModuleClassLoader. + rootModule.setModuleClassLoader(moduleClassLoader); +
+ found : @Initialized @Nullable ClassLoader + required: @Initialized @NonNull ClassLoader +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + dereference.of.nullable + dereference of possibly-null reference Checker.class.getPackage() + Checker.class.getPackage().getName() + ".", moduleClassLoader); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + dereference.of.nullable + dereference of possibly-null reference CheckstyleAntTask.class.getPackage() + final String version = CheckstyleAntTask.class.getPackage().getImplementationVersion(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + initialization.field.uninitialized + the default constructor does not initialize field classpath + private Path classpath; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + initialization.field.uninitialized + the default constructor does not initialize field config + private String config; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + initialization.field.uninitialized + the default constructor does not initialize field failureProperty + private String failureProperty; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + initialization.field.uninitialized + the default constructor does not initialize field fileName + private String fileName; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + initialization.field.uninitialized + the default constructor does not initialize field key + private String key; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + initialization.field.uninitialized + the default constructor does not initialize field properties + private File properties; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + initialization.field.uninitialized + the default constructor does not initialize field toFile + private File toFile; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + initialization.field.uninitialized + the default constructor does not initialize field type + private FormatterType type; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + initialization.field.uninitialized + the default constructor does not initialize field value + private String value; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractCheck.java + argument + incompatible argument for parameter customMessage of Violation. + getCustomMessages().get(key))); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractCheck.java + initialization.field.uninitialized + the default constructor does not initialize field fileContents + private FileContents fileContents; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractCheck.java + type.argument + incompatible type argument for type parameter T of ThreadLocal. + private final ThreadLocal<FileContext> context = ThreadLocal.withInitial(FileContext::new); +
+ found : @Initialized @NonNull FileContext + required: [extends @Initialized @Nullable Object super null (NullType)] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java + argument + incompatible argument for parameter customMessage of Violation. + getCustomMessages().get(key))); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java + initialization.field.uninitialized + the default constructor does not initialize field fileContents + private FileContents fileContents; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java + initialization.field.uninitialized + the default constructor does not initialize field fileExtensions + private String[] fileExtensions; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java + initialization.field.uninitialized + the default constructor does not initialize field messageDispatcher + private MessageDispatcher messageDispatcher; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java + type.argument + incompatible type argument for type parameter T of ThreadLocal. + private final ThreadLocal<FileContext> context = ThreadLocal.withInitial(FileContext::new); +
+ found : @Initialized @NonNull FileContext + required: [extends @Initialized @Nullable Object super null (NullType)] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractViolationReporter.java + initialization.field.uninitialized + the default constructor does not initialize field id + private String id; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AuditEvent.java + argument + incompatible argument for parameter fileName of AuditEvent. + this(source, null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AuditEvent.java + argument + incompatible argument for parameter violation of AuditEvent. + this(src, fileName, null); +
+ found : null (NullType) + required: @Initialized @NonNull Violation +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java + initialization.field.uninitialized + the default constructor does not initialize field configuration + private Configuration configuration; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable URI + method return type: @Initialized @NonNull Object +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java + toarray.nullable.elements.not.newarray + call of toArray on collection of non-null elements yields an array of possibly-null elements; omit the argument to toArray or make it an explicit array constructor + return result.toArray(CommonUtil.EMPTY_STRING_ARRAY); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java + toarray.nullable.elements.not.newarray + call of toArray on collection of non-null elements yields an array of possibly-null elements; omit the argument to toArray or make it an explicit array constructor + return result.toArray(EMPTY_MODIFIER_ARRAY); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java + return + incompatible types in return. + return javadocComments.get(lineNo); +
+ type of expression: @Initialized @Nullable TextBlock + method return type: @Initialized @NonNull TextBlock +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + assignment + incompatible types in assignment. + charset = null; +
+ found : null (NullType) + required: @Initialized @NonNull Charset +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + assignment + incompatible types in assignment. + lineBreaks = null; +
+ found : null (NullType) + required: @Initialized @NonNull int @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + assignment + incompatible types in assignment. + lines = textLines.toArray(CommonUtil.EMPTY_STRING_ARRAY); +
+ found : @Initialized @Nullable String @Initialized @NonNull [] + required: @Initialized @NonNull String @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + assignment + incompatible types in assignment. + this.lines = lines.toArray(CommonUtil.EMPTY_STRING_ARRAY); +
+ found : @Initialized @Nullable String @Initialized @NonNull [] + required: @Initialized @NonNull String @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + initialization.fields.uninitialized + the constructor does not initialize fields: lineBreaks + public FileText(File file, List<String> lines) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + initialization.fields.uninitialized + the constructor does not initialize fields: lineBreaks + public FileText(File file, String charsetName) throws IOException { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + toarray.nullable.elements.not.newarray + call of toArray on collection of non-null elements yields an array of possibly-null elements; omit the argument to toArray or make it an explicit array constructor + lines = textLines.toArray(CommonUtil.EMPTY_STRING_ARRAY); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java + toarray.nullable.elements.not.newarray + call of toArray on collection of non-null elements yields an array of possibly-null elements; omit the argument to toArray or make it an explicit array constructor + this.lines = lines.toArray(CommonUtil.EMPTY_STRING_ARRAY); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/FullIdent.java + initialization.fields.uninitialized + the constructor does not initialize fields: detailAst + private FullIdent() { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/LineColumn.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @Initialized @NonNull Object + required: @Initialized @Nullable Object + Consequence: method in @Initialized @NonNull LineColumn + @Initialized @NonNull boolean equals(@Initialized @NonNull LineColumn this, @Initialized @NonNull Object p0) + cannot override method in @Initialized @NonNull Object + @Initialized @NonNull boolean equals(@Initialized @NonNull Object this, @Initialized @Nullable Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + argument + incompatible argument for parameter loader of getBundle. + name, sLocale, sourceClass.getClassLoader(), new Utf8Control()); +
+ found : @Initialized @Nullable ClassLoader + required: @Initialized @NonNull ClassLoader +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + assignment + incompatible types in assignment. + this.args = null; +
+ found : null (NullType) + required: @Initialized @NonNull Object @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + override.param + Incompatible parameter type for object. + public boolean equals(Object object) { +
+ found : @Initialized @NonNull Object + required: @Initialized @Nullable Object + Consequence: method in @Initialized @NonNull Violation + @Initialized @NonNull boolean equals(@Initialized @NonNull Violation this, @Initialized @NonNull Object p0) + cannot override method in @Initialized @NonNull Object + @Initialized @NonNull boolean equals(@Initialized @NonNull Object this, @Initialized @Nullable Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + return + incompatible types in return. + return resourceBundle; +
+ type of expression: @Initialized @Nullable ResourceBundle + method return type: @Initialized @NonNull ResourceBundle +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + return + incompatible types in return. + return violation; +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/AvoidEscapedUnicodeCharactersCheck.java + initialization.field.uninitialized + the default constructor does not initialize field blockComments + private Map<Integer, List<TextBlock>> blockComments; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/AvoidEscapedUnicodeCharactersCheck.java + initialization.field.uninitialized + the default constructor does not initialize field singlelineComments + private Map<Integer, TextBlock> singlelineComments; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java + initialization.field.uninitialized + the default constructor does not initialize field maximumMessage + private String maximumMessage; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java + initialization.field.uninitialized + the default constructor does not initialize field minimumMessage + private String minimumMessage; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/OrderedPropertiesCheck.java + argument + incompatible argument for parameter args of log. + log(1, MSG_IO_EXCEPTION_KEY, file.getPath(), ex.getLocalizedMessage()); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull Object +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/OrderedPropertiesCheck.java + method.invocation + call to setFileExtensions(java.lang.String...) not allowed on the given receiver. + setFileExtensions("properties"); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.OrderedPropertiesCheck.class) @NonNull AbstractFileSetCheck + required: @Initialized @NonNull AbstractFileSetCheck +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/OrderedPropertiesCheck.java + override.return + Incompatible return type. + public Enumeration<Object> keys() { +
+ found : Enumeration<Object> + required: Enumeration<@KeyFor("this") Object> + Consequence: method in SequencedProperties + Enumeration<Object> keys(SequencedProperties this) + cannot override method in Hashtable<Object, Object> + Enumeration<@KeyFor("this") Object> keys(Hashtable<Object, Object> this) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/OuterTypeFilenameCheck.java + assignment + incompatible types in assignment. + wrongType = null; +
+ found : null (NullType) + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/OuterTypeFilenameCheck.java + initialization.field.uninitialized + the default constructor does not initialize field fileName + private String fileName; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/OuterTypeFilenameCheck.java + initialization.field.uninitialized + the default constructor does not initialize field wrongType + private DetailAST wrongType; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/SuppressWarningsHolder.java + type.argument + incompatible type argument for type parameter T of ThreadLocal. + private static final ThreadLocal<List<Entry>> ENTRIES = +
+ found : @Initialized @NonNull List<@Initialized @NonNull Entry> + required: [extends @Initialized @Nullable Object super null (NullType)] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheck.java + initialization.field.uninitialized + the default constructor does not initialize field legalComment + private Pattern legalComment; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java + argument + incompatible argument for parameter args of Violation. + args, +
+ found : @Initialized @NonNull String @Initialized @Nullable [] + required: @Initialized @NonNull Object @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java + argument + incompatible argument for parameter customMessage of Violation. + WRONG_LANGUAGE_CODE_KEY, new Object[] {code}, getId(), getClass(), null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java + argument + incompatible argument for parameter customMessage of Violation. + getClass(), null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java + argument + incompatible argument for parameter languageCode of getMissingFileName. + getMissingFileName(bundle, null) +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java + assignment + incompatible types in assignment. + args = new String[] {exception.getMessage()}; +
+ found : @Initialized @Nullable String @Initialized @NonNull [] + required: @Initialized @NonNull String @UnknownInitialization @Nullable [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java + method.invocation + call to setFileExtensions(java.lang.String...) not allowed on the given receiver. + setFileExtensions("properties"); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck.class) @NonNull AbstractFileSetCheck + required: @Initialized @NonNull AbstractFileSetCheck +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheck.java + argument + incompatible argument for parameter ast of createFullIdent. + packageName = FullIdent.createFullIdent(null); +
+ found : null (NullType) + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheck.java + assignment + incompatible types in assignment. + currentClass = null; +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheck.java + initialization.field.uninitialized + the default constructor does not initialize field currentClass + private String currentClass; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheck.java + initialization.field.uninitialized + the default constructor does not initialize field packageName + private FullIdent packageName; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheck.java + argument + incompatible argument for parameter args of log. + ex.getLocalizedMessage()); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull Object +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheck.java + method.invocation + call to setFileExtensions(java.lang.String...) not allowed on the given receiver. + setFileExtensions("properties"); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.UniquePropertiesCheck.class) @NonNull AbstractFileSetCheck + required: @Initialized @NonNull AbstractFileSetCheck +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheck.java + introduce.eliminate + It is bad style to create an Optional just to chain methods to get a value. + .orElse(modifiers); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheck.java + return + incompatible types in return. + return brace; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheck.java + argument + incompatible argument for parameter rcurly of Details. + return new Details(lcurly, rcurly, getNextToken(ast), true); +
+ found : @Initialized @Nullable DetailAST + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheck.java + argument + incompatible argument for parameter rcurly of Details. + return new Details(lcurly, rcurly, nextToken, shouldCheckLastRcurly); +
+ found : @Initialized @Nullable DetailAST + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheck.java + return + incompatible types in return. + return next; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/DeclarationOrderCheck.java + argument + incompatible argument for parameter state of processModifiersState. + final boolean isStateValid = processModifiersState(ast, state); +
+ found : @Initialized @Nullable ScopeState + required: @Initialized @NonNull ScopeState +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/DeclarationOrderCheck.java + dereference.of.nullable + dereference of possibly-null reference state + if (state.currentScopeState > STATE_CTOR_DEF) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/DeclarationOrderCheck.java + dereference.of.nullable + dereference of possibly-null reference state + state.currentScopeState = STATE_METHOD_DEF; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/DeclarationOrderCheck.java + initialization.field.uninitialized + the default constructor does not initialize field classFieldNames + private Set<String> classFieldNames; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/DeclarationOrderCheck.java + initialization.field.uninitialized + the default constructor does not initialize field scopeStates + private Deque<ScopeState> scopeStates; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/DefaultComesLastCheck.java + return + incompatible types in return. + return token; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsAvoidNullCheck.java + argument + incompatible argument for parameter parent of FieldFrame. + currentFrame = new FieldFrame(null); +
+ found : null (NullType) + required: @Initialized @NonNull FieldFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsAvoidNullCheck.java + initialization.field.uninitialized + the default constructor does not initialize field currentFrame + private FieldFrame currentFrame; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsAvoidNullCheck.java + initialization.fields.uninitialized + the constructor does not initialize fields: frameName + /* package */ FieldFrame(FieldFrame parent) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsAvoidNullCheck.java + return + incompatible types in return. + return fieldNameToAst.get(name); +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsAvoidNullCheck.java + return + incompatible types in return. + return fieldType; +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + argument + incompatible argument for parameter prevScopeUninitializedVariableData of updateAllUninitializedVariables. + updateAllUninitializedVariables(prevScopeUninitializedVariableData); +
+ found : @Initialized @Nullable Deque<@Initialized @NonNull DetailAST> + required: @Initialized @NonNull Deque<@Initialized @NonNull DetailAST> +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + dereference.of.nullable + dereference of possibly-null reference candidate + shouldRemove = candidate.alreadyAssigned; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + dereference.of.nullable + dereference of possibly-null reference currentScopeAssignedVariables.peek() + currentScopeAssignedVariables.peek().add(ast); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + dereference.of.nullable + dereference of possibly-null reference currentScopeAssignedVariables.peek() + final Iterator<DetailAST> iterator = currentScopeAssignedVariables.peek().iterator(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + dereference.of.nullable + dereference of possibly-null reference scopeData + scopeData.uninitializedVariables.forEach(prevScopeUninitializedVariableData::push); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + dereference.of.nullable + dereference of possibly-null reference scopeStack.peek() + containsBreak = scopeStack.peek().containsBreak; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + dereference.of.nullable + dereference of possibly-null reference scopeStack.peek() + final Map<String, FinalVariableCandidate> scope = scopeStack.peek().scope; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + dereference.of.nullable + dereference of possibly-null reference scopeStack.peek() + scopeStack.peek().containsBreak = true; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + dereference.of.nullable + dereference of possibly-null reference scopeStack.peek() + scopeStack.peek().uninitializedVariables.add(astNode); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + not.interned + attempting to use a non-@Interned comparison operand + == ast.getParent()) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + not.interned + attempting to use a non-@Interned comparison operand + if (currAstLoopAstParent == currVarLoopAstParent) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + not.interned + attempting to use a non-@Interned comparison operand + result = findLastCaseGroupWhichContainsSlist(ast.getParent()) != ast; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + not.interned + attempting to use a non-@Interned comparison operand + return classOrMethodOfAst1 == classOrMethodOfAst2 && ast1.getText().equals(ast2.getText()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + not.interned + attempting to use a non-@Interned comparison operand + || ast.getParent().getParent().findFirstToken(TokenTypes.CASE_GROUP) + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + not.interned + attempting to use a non-@Interned comparison operand + || findLastCaseGroupWhichContainsSlist(parentAst.getParent()) == parentAst) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java + return + incompatible types in return. + return returnValue; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java + argument + incompatible argument for parameter frameName of FieldFrame. + final FieldFrame newFrame = new FieldFrame(frame, isStaticInnerType, frameName); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java + argument + incompatible argument for parameter frameName of FieldFrame. + frame = new FieldFrame(null, true, null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java + argument + incompatible argument for parameter parent of FieldFrame. + frame = new FieldFrame(null, true, null); +
+ found : null (NullType) + required: @Initialized @NonNull FieldFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java + initialization.field.uninitialized + the default constructor does not initialize field frame + private FieldFrame frame; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java + initialization.field.uninitialized + the default constructor does not initialize field ignoreFormat + private Pattern ignoreFormat; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java + assignment + incompatible types in assignment. + pkgName = null; +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java + initialization.field.uninitialized + the default constructor does not initialize field pkgName + private String pkgName; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java + return + incompatible types in return. + return fullClassName; +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java + return + incompatible types in return. + return illegalType; +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java + not.interned + attempting to use a non-@Interned comparison operand + while (astNode != constantDefAST) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java + return + incompatible types in return. + return constantDef; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MatchXpathCheck.java + initialization.field.uninitialized + the default constructor does not initialize field xpathExpression + private XPathExpression xpathExpression; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ModifiedControlVariableCheck.java + return + incompatible types in return. + return variableStack.peek(); +
+ type of expression: @Initialized @Nullable Deque<@Initialized @NonNull String> + method return type: @Initialized @NonNull Deque<@Initialized @NonNull String> +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleStringLiteralsCheck.java + assignment + incompatible types in assignment. + this.ignoreStringsRegexp = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleStringLiteralsCheck.java + initialization.fields.uninitialized + the constructor does not initialize fields: ignoreStringsRegexp + public MultipleStringLiteralsCheck() { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleStringLiteralsCheck.java + method.invocation + call to setIgnoreStringsRegexp(java.util.regex.Pattern) not allowed on the given receiver. + setIgnoreStringsRegexp(Pattern.compile("^\"\"$")); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.api.AbstractCheck.class) @NonNull MultipleStringLiteralsCheck + required: @Initialized @NonNull MultipleStringLiteralsCheck +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/OverloadMethodsDeclarationOrderCheck.java + unboxing.of.nullable + unboxing a possibly-null reference methodLineNumberMap.get(methodName) + methodLineNumberMap.get(methodName); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ParameterAssignmentCheck.java + initialization.field.uninitialized + the default constructor does not initialize field parameterNames + private Set<String> parameterNames; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter arg0 of push. + current.push(frames.get(ast)); +
+ found : @Initialized @Nullable AbstractFrame + required: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter arg1 of put. + frames.put(ast, frameStack.poll()); +
+ found : @Initialized @Nullable AbstractFrame + required: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter frame of collectMethodDeclarations. + collectMethodDeclarations(frameStack, ast, frame); +
+ found : @Initialized @Nullable AbstractFrame + required: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter frame of collectVariableDeclarations. + collectVariableDeclarations(ast, frame); +
+ found : @Initialized @Nullable AbstractFrame + required: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter frame of findFrame. + frame = findFrame(frame, name, lookForMethod); +
+ found : @Initialized @Nullable AbstractFrame + required: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter frame of findFrame. + return findFrame(current.peek(), name, lookForMethod); +
+ found : @Initialized @Nullable AbstractFrame + required: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter ident of ClassFrame. + super(parent, null); +
+ found : null (NullType) + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter parent of AnonymousClassFrame. + frameStack.addFirst(new AnonymousClassFrame(frame, +
+ found : @Initialized @Nullable AbstractFrame + required: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter parent of BlockFrame. + frameStack.addFirst(new BlockFrame(frame, ast)); +
+ found : @Initialized @Nullable AbstractFrame + required: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter parent of CatchFrame. + final AbstractFrame catchFrame = new CatchFrame(frame, ast); +
+ found : @Initialized @Nullable AbstractFrame + required: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter parent of ClassFrame. + frameStack.addFirst(new ClassFrame(frame, classFrameNameIdent)); +
+ found : @Initialized @Nullable AbstractFrame + required: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter parent of ConstructorFrame. + frameStack.addFirst(new ConstructorFrame(frame, ctorFrameNameIdent)); +
+ found : @Initialized @Nullable AbstractFrame + required: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter parent of ForFrame. + final AbstractFrame forFrame = new ForFrame(frame, ast); +
+ found : @Initialized @Nullable AbstractFrame + required: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + argument + incompatible argument for parameter parent of TryWithResourcesFrame. + frameStack.addFirst(new TryWithResourcesFrame(frame, ast)); +
+ found : @Initialized @Nullable AbstractFrame + required: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + dereference.of.nullable + dereference of possibly-null reference ((ClassFrame)frame) + ((ClassFrame) frame).addInstanceMember(componentIdent); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + dereference.of.nullable + dereference of possibly-null reference ((ClassFrame)frame) + ((ClassFrame) frame).addStaticMember(ident); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + dereference.of.nullable + dereference of possibly-null reference current.peek() + if (current.peek().getType() == FrameType.TRY_WITH_RESOURCES_FRAME) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + dereference.of.nullable + dereference of possibly-null reference frame + frame.addIdent(parameterIdent); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + dereference.of.nullable + dereference of possibly-null reference frame + frame.addIdent(resourceIdent); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + dereference.of.nullable + dereference of possibly-null reference frame + while (frame.getType() != FrameType.CLASS_FRAME) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + initialization.field.uninitialized + the default constructor does not initialize field frames + private Map<DetailAST, AbstractFrame> frames; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + return + incompatible types in return. + return blockEndToken; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + return + incompatible types in return. + return frame; +
+ type of expression: @Initialized @Nullable AbstractFrame + method return type: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + return + incompatible types in return. + return frameWhereViolationIsFound; +
+ type of expression: @Initialized @Nullable AbstractFrame + method return type: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable AbstractFrame + method return type: @Initialized @NonNull AbstractFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheck.java + initialization.field.uninitialized + the default constructor does not initialize field context + private Context context; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheck.java + initialization.fields.uninitialized + the constructor does not initialize fields: maxAllowed + /* package */ Context(boolean checking) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheck.java + assignment + incompatible types in assignment. + parentToSkip = null; +
+ found : null (NullType) + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheck.java + initialization.field.uninitialized + the default constructor does not initialize field parentToSkip + private DetailAST parentToSkip; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheck.java + not.interned + attempting to use a non-@Interned comparison operand + if (parentToSkip != ast && isExprSurrounded(ast)) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + argument + incompatible argument for parameter arg1 of put. + anonInnerAstToTypeDeclDesc.put(literalNewAst, typeDeclarations.peek()); +
+ found : @Initialized @Nullable TypeDeclDesc + required: @Initialized @NonNull TypeDeclDesc +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + argument + incompatible argument for parameter outerClassQualifiedName of getQualifiedTypeDeclarationName. + .getQualifiedTypeDeclarationName(packageName, outerClassQualifiedName, className); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + assignment + incompatible types in assignment. + packageName = null; +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + dereference.of.nullable + dereference of possibly-null reference anonInnerAstToTypeDeclDesc.get(literalNewAst) + anonInnerAstToTypeDeclDesc.get(literalNewAst).getQualifiedName(), + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + dereference.of.nullable + dereference of possibly-null reference typeDeclAstToTypeDeclDesc.get(obtainedClass.getTypeDeclAst()) + .get(obtainedClass.getTypeDeclAst()) + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + dereference.of.nullable + dereference of possibly-null reference typeDeclAstToTypeDeclDesc.get(parentAst.getParent()) + typeDeclAstToTypeDeclDesc.get(parentAst.getParent()).addInstOrClassVar(desc); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + dereference.of.nullable + dereference of possibly-null reference typeDeclarations.peek() + outerClassQualifiedName = typeDeclarations.peek().getQualifiedName(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + dereference.of.nullable + dereference of possibly-null reference variablesStack.peek() + while (!variablesStack.isEmpty() && variablesStack.peek().getScope() == scopeAst) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + not.interned + attempting to use a non-@Interned comparison operand + && identAst != parent.getLastChild(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + not.interned + attempting to use a non-@Interned comparison operand + && parent.getFirstChild() != identAst; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + not.interned + attempting to use a non-@Interned comparison operand + while (!variablesStack.isEmpty() && variablesStack.peek().getScope() == scopeAst) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + not.interned + attempting to use a non-@Interned comparison operand + while (currNode != ast && toVisit == null) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + return + incompatible types in return. + return obtainedClass; +
+ type of expression: @Initialized @Nullable TypeDeclDesc + method return type: @Initialized @NonNull TypeDeclDesc +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/VariableDeclarationUsageDistanceCheck.java + argument + incompatible argument for parameter key of SimpleEntry. + return new SimpleEntry<>(variableUsageAst, dist); +
+ found : @Initialized @Nullable DetailAST + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/VariableDeclarationUsageDistanceCheck.java + introduce.eliminate + It is bad style to create an Optional just to chain methods to get a value. + .orElseGet(() -> block.findFirstToken(TokenTypes.SWITCH_RULE)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/VariableDeclarationUsageDistanceCheck.java + not.interned + attempting to use a non-@Interned comparison operand + if (curNode == parent) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/VariableDeclarationUsageDistanceCheck.java + return + incompatible types in return. + return firstNodeInsideBlock; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/VariableDeclarationUsageDistanceCheck.java + return + incompatible types in return. + return variableUsageNode; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/DesignForExtensionCheck.java + not.interned + attempting to use a non-@Interned comparison operand + if (curNode == token) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/DesignForExtensionCheck.java + not.interned + attempting to use a non-@Interned comparison operand + return currentNode != methodImplCloseBrace + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java + argument + incompatible argument for parameter outerClassQualifiedName of getQualifiedTypeDeclarationName. + outerTypeDeclarationQualifiedName, +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java + dereference.of.nullable + dereference of possibly-null reference typeDeclarations.peek() + .put(ast, typeDeclarations.peek().getQualifiedName()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java + dereference.of.nullable + dereference of possibly-null reference typeDeclarations.peek() + outerTypeDeclarationQualifiedName = typeDeclarations.peek().getQualifiedName(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java + initialization.field.uninitialized + the default constructor does not initialize field anonInnerClassToOuterTypeDecl + private Map<DetailAST, String> anonInnerClassToOuterTypeDecl; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java + initialization.field.uninitialized + the default constructor does not initialize field innerClasses + private Map<String, ClassDesc> innerClasses; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java + initialization.field.uninitialized + the default constructor does not initialize field packageName + private String packageName; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java + initialization.field.uninitialized + the default constructor does not initialize field typeDeclarations + private Deque<TypeDeclarationDescription> typeDeclarations; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java + return + incompatible types in return. + return superClassName; +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/OneTopLevelClassCheck.java + argument + incompatible argument for parameter typeDef of isPublic. + if (publicTypeFound && !isPublic(firstType)) { +
+ found : @Initialized @Nullable DetailAST + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheck.java + return + incompatible types in return. + return matchingAnnotation; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/AbstractHeaderCheck.java + initialization.field.uninitialized + the default constructor does not initialize field headerFile + private URI headerFile; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheck.java + argument + incompatible argument for parameter previousImport of isAlphabeticalOrderBroken. + if (isAlphabeticalOrderBroken(previousImportFromCurrentGroup, fullImportIdent)) { +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheck.java + argument + incompatible argument for parameter previousImport of validateExtraEmptyLine. + validateExtraEmptyLine(previousImportObjectFromCurrentGroup, +
+ found : @Initialized @Nullable ImportDetails + required: @Initialized @NonNull ImportDetails +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheck.java + argument + incompatible argument for parameter previousImport of validateMissedEmptyLine. + validateMissedEmptyLine(previousImportObjectFromCurrentGroup, +
+ found : @Initialized @Nullable ImportDetails + required: @Initialized @NonNull ImportDetails +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/FileImportControl.java + assignment + incompatible types in assignment. + patternForExactMatch = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/FileImportControl.java + return + incompatible types in return. + return finestMatch; +
+ type of expression: @Initialized @Nullable AbstractImportControl + method return type: @Initialized @NonNull AbstractImportControl +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/IllegalImportCheck.java + initialization.fields.uninitialized + the constructor does not initialize fields: illegalPkgs, illegalClasses + public IllegalImportCheck() { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/IllegalImportCheck.java + method.invocation + call to setIllegalPkgs(java.lang.String...) not allowed on the given receiver. + setIllegalPkgs("sun"); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.api.AbstractCheck.class) @NonNull IllegalImportCheck + required: @Initialized @NonNull IllegalImportCheck +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheck.java + assignment + incompatible types in assignment. + currentImportControl = null; +
+ found : null (NullType) + required: @Initialized @NonNull AbstractImportControl +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheck.java + initialization.field.uninitialized + the default constructor does not initialize field currentImportControl + private AbstractImportControl currentImportControl; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheck.java + initialization.field.uninitialized + the default constructor does not initialize field file + private URI file; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheck.java + initialization.field.uninitialized + the default constructor does not initialize field fileName + private String fileName; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheck.java + initialization.field.uninitialized + the default constructor does not initialize field packageName + private String packageName; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheck.java + initialization.field.uninitialized + the default constructor does not initialize field root + private PkgImportControl root; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoader.java + argument + incompatible argument for parameter parent of FileImportControl. + final AbstractImportControl importControl = new FileImportControl(parentImportControl, +
+ found : @Initialized @Nullable PkgImportControl + required: @Initialized @NonNull PkgImportControl +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoader.java + argument + incompatible argument for parameter parent of PkgImportControl. + final AbstractImportControl importControl = new PkgImportControl(parentImportControl, +
+ found : @Initialized @Nullable PkgImportControl + required: @Initialized @NonNull PkgImportControl +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoader.java + dereference.of.nullable + dereference of possibly-null reference parentImportControl + parentImportControl.addChild(importControl); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoader.java + dereference.of.nullable + dereference of possibly-null reference stack.peek() + stack.peek().addImportRule(rule); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoader.java + return + incompatible types in return. + return (PkgImportControl) stack.peek(); +
+ type of expression: @Initialized @Nullable PkgImportControl + method return type: @Initialized @NonNull PkgImportControl +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java + initialization.field.uninitialized + the default constructor does not initialize field lastImport + private String lastImport; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgImportControl.java + argument + incompatible argument for parameter parent of AbstractImportControl. + super(null, strategyOnMismatch); +
+ found : null (NullType) + required: @Initialized @NonNull AbstractImportControl +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgImportControl.java + assignment + incompatible types in assignment. + patternForExactMatch = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgImportControl.java + assignment + incompatible types in assignment. + patternForPartialMatch = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgImportControl.java + return + incompatible types in return. + return finestMatch; +
+ type of expression: @Initialized @Nullable AbstractImportControl + method return type: @Initialized @NonNull AbstractImportControl +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/RedundantImportCheck.java + assignment + incompatible types in assignment. + pkgName = null; +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/RedundantImportCheck.java + initialization.field.uninitialized + the default constructor does not initialize field pkgName + private String pkgName; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheck.java + argument + incompatible argument for parameter parent of Frame. + return new Frame(null); +
+ found : null (NullType) + required: @Initialized @NonNull Frame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheck.java + argument + incompatible argument for parameter type of topLevelType. + references.add(topLevelType(matcher.group(1))); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheck.java + initialization.field.uninitialized + the default constructor does not initialize field currentFrame + private Frame currentFrame; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/AbstractExpressionHandler.java + initialization.fields.uninitialized + the constructor does not initialize fields: indent + protected AbstractExpressionHandler(IndentationCheck indentCheck, String typeName, + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/AbstractExpressionHandler.java + not.interned + attempting to use a non-@Interned comparison operand + while (curNode != ast && toVisit == null) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/AnnotationArrayInitHandler.java + return + incompatible types in return. + return null; +
+ type of expression: null (NullType) + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ArrayInitHandler.java + return + incompatible types in return. + return null; +
+ type of expression: null (NullType) + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java + not.interned + attempting to use a non-@Interned comparison operand + if (nonList != nonListStartAst) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ClassDefHandler.java + return + incompatible types in return. + return null; +
+ type of expression: null (NullType) + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CommentsIndentationCheck.java + not.interned + attempting to use a non-@Interned comparison operand + while (nextToken != null && nextToken != currentStatement && isComment(nextToken)) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CommentsIndentationCheck.java + return + incompatible types in return. + return prevCaseToken; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CommentsIndentationCheck.java + return + incompatible types in return. + return prevStmt; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CommentsIndentationCheck.java + return + incompatible types in return. + return previousStatement; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/DetailAstSet.java + return + incompatible types in return. + return astLines.get(lineNum); +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/DetailAstSet.java + return + incompatible types in return. + return startColumn; +
+ type of expression: @Initialized @Nullable Integer + method return type: @Initialized @NonNull Integer +
+
+ + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + argument + incompatible argument for parameter constructor of invokeConstructor. + handlerCtor, indentCheck, ast, parent); +
+ found : @Initialized @Nullable Constructor<capture#788 extends @Initialized @Nullable Object> + required: @Initialized @NonNull Constructor<capture#788 extends @Initialized @Nullable Object> +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.ANNOTATION_ARRAY_INIT, AnnotationArrayInitHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.ANNOTATION_DEF, ClassDefHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.ANNOTATION_FIELD_DEF, MethodDefHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.ARRAY_INIT, ArrayInitHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.CASE_GROUP, CaseHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.CLASS_DEF, ClassDefHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.COMPACT_CTOR_DEF, MethodDefHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.CTOR_CALL, MethodCallHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.CTOR_DEF, MethodDefHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.ENUM_DEF, ClassDefHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.IMPORT, ImportHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.INDEX_OP, IndexHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.INSTANCE_INIT, SlistHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.INTERFACE_DEF, ClassDefHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LABELED_STAT, LabelHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LAMBDA, LambdaHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LITERAL_CATCH, CatchHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LITERAL_DO, DoWhileHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LITERAL_ELSE, ElseHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LITERAL_FINALLY, FinallyHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LITERAL_FOR, ForHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LITERAL_IF, IfHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LITERAL_NEW, NewHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LITERAL_SWITCH, SwitchHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LITERAL_SYNCHRONIZED, SynchronizedHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LITERAL_TRY, TryHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LITERAL_WHILE, WhileHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.LITERAL_YIELD, YieldHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.METHOD_CALL, MethodCallHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.METHOD_DEF, MethodDefHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.OBJBLOCK, ObjectBlockHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.PACKAGE_DEF, PackageDefHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.RECORD_DEF, ClassDefHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.SLIST, SlistHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.STATIC_INIT, StaticInitHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.SUPER_CTOR_CALL, MethodCallHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.SWITCH_RULE, SwitchRuleHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + method.invocation + call to <T>register(int,java.lang.Class<T>) not allowed on the given receiver. + register(TokenTypes.VARIABLE_DEF, MemberDefHandler.class); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory + required: @Initialized @NonNull HandlerFactory +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + return + incompatible types in return. + return resultHandler; +
+ type of expression: @Initialized @Nullable AbstractExpressionHandler + method return type: @Initialized @NonNull AbstractExpressionHandler +
+
+ + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java + type.argument + incompatible type argument for type parameter T extends Object of invokeConstructor. + resultHandler = (AbstractExpressionHandler) CommonUtil.invokeConstructor( +
+ found : capture#788[ extends @UnknownKeyFor Object super @KeyForBottom Void] + required: [extends @UnknownKeyFor Object super @UnknownKeyFor NullType] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java + argument + incompatible argument for parameter instance of LineWrappingHandler. + private final LineWrappingHandler lineWrappingHandler = new LineWrappingHandler(this); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.api.AbstractCheck.class) @NonNull IndentationCheck + required: @Initialized @NonNull IndentationCheck +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java + argument + incompatible argument for parameter parent of getHandler. + handlers.peek()); +
+ found : @Initialized @Nullable AbstractExpressionHandler + required: @Initialized @NonNull AbstractExpressionHandler +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java + assignment + incompatible types in assignment. + private final LineWrappingHandler lineWrappingHandler = new LineWrappingHandler(this); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.LineWrappingHandler.class) @NonNull LineWrappingHandler + required: @Initialized @NonNull LineWrappingHandler +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java + initialization.field.uninitialized + the default constructor does not initialize field incorrectIndentationLines + private Set<Integer> incorrectIndentationLines; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/LineWrappingHandler.java + not.interned + attempting to use a non-@Interned comparison operand + while (curNode != lastNode) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/MethodDefHandler.java + return + incompatible types in return. + return null; +
+ type of expression: null (NullType) + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ObjectBlockHandler.java + return + incompatible types in return. + return null; +
+ type of expression: null (NullType) + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/PrimordialHandler.java + argument + incompatible argument for parameter expr of AbstractExpressionHandler. + super(indentCheck, null, null, null); +
+ found : null (NullType) + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/PrimordialHandler.java + argument + incompatible argument for parameter parent of AbstractExpressionHandler. + super(indentCheck, null, null, null); +
+ found : null (NullType) + required: @Initialized @NonNull AbstractExpressionHandler +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/PrimordialHandler.java + argument + incompatible argument for parameter typeName of AbstractExpressionHandler. + super(indentCheck, null, null, null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/SlistHandler.java + return + incompatible types in return. + return null; +
+ type of expression: null (NullType) + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/SwitchHandler.java + return + incompatible types in return. + return null; +
+ type of expression: null (NullType) + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/AbstractJavadocCheck.java + initialization.field.uninitialized + the default constructor does not initialize field blockCommentAst + private DetailAST blockCommentAst; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/AbstractJavadocCheck.java + type.argument + incompatible type argument for type parameter T of ThreadLocal. + private final ThreadLocal<FileContext> context = ThreadLocal.withInitial(FileContext::new); +
+ found : @Initialized @NonNull FileContext + required: [extends @Initialized @Nullable Object super null (NullType)] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/AbstractJavadocCheck.java + type.argument + incompatible type argument for type parameter T of ThreadLocal. + private static final ThreadLocal<Map<LineColumn, ParseStatus>> TREE_CACHE = +
+ found : @Initialized @NonNull Map<@Initialized @NonNull LineColumn, @Initialized @NonNull ParseStatus> + required: [extends @Initialized @Nullable Object super null (NullType)] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocBlockTagLocationCheck.java + argument + incompatible argument for parameter arg0 of contains. + if (tags.contains(tagName)) { +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull Object +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocBlockTagLocationCheck.java + initialization.fields.uninitialized + the constructor does not initialize fields: tags + public JavadocBlockTagLocationCheck() { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocBlockTagLocationCheck.java + method.invocation + call to setTags(java.lang.String...) not allowed on the given receiver. + setTags(DEFAULT_TAGS); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.javadoc.AbstractJavadocCheck.class) @NonNull JavadocBlockTagLocationCheck + required: @Initialized @NonNull JavadocBlockTagLocationCheck +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + argument + incompatible argument for parameter firstArg of JavadocTag. + javadocArgMatcher.group(2))); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + argument + incompatible argument for parameter firstArg of JavadocTag. + javadocArgMissingDescriptionMatcher.group(2))); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + argument + incompatible argument for parameter tag of JavadocTag. + javadocArgMissingDescriptionMatcher.group(1), +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + argument + incompatible argument for parameter tag of JavadocTag. + tags.add(new JavadocTag(currentLine, col, javadocArgMatcher.group(1), +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + argument + incompatible argument for parameter tag of JavadocTag. + tags.add(new JavadocTag(currentLine, col, javadocNoargMatcher.group(1))); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + argument + incompatible argument for parameter tag of JavadocTag. + tags.add(new JavadocTag(currentLine, col, noargCurlyMatcher.group(1))); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + argument + incompatible argument for parameter tag of JavadocTag. + tags.add(new JavadocTag(tagLine, col, param1)); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + initialization.field.uninitialized + the default constructor does not initialize field currentClassName + private String currentClassName; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + not.interned + attempting to use a non-@Interned comparison operand + if (curNode != root) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + not.interned + attempting to use a non-@Interned comparison operand + return ancestor != methodBodyAst; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + not.interned + attempting to use a non-@Interned comparison operand + while (ancestor != methodBodyAst) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + not.interned + attempting to use a non-@Interned comparison operand + while (curNode != root && curNode.getNextSibling() == null) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + not.interned + attempting to use a non-@Interned comparison operand + } while (curNode != root); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocNodeImpl.java + initialization.field.uninitialized + the default constructor does not initialize field children + private DetailNode[] children; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocNodeImpl.java + initialization.field.uninitialized + the default constructor does not initialize field parent + private DetailNode parent; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocNodeImpl.java + initialization.field.uninitialized + the default constructor does not initialize field text + private String text; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocPackageCheck.java + argument + incompatible argument for parameter arg0 of add. + final boolean isDirChecked = !directoriesChecked.add(dir); +
+ found : @Initialized @Nullable File + required: @Initialized @NonNull File +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocPackageCheck.java + method.invocation + call to setFileExtensions(java.lang.String...) not allowed on the given receiver. + setFileExtensions("java"); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocPackageCheck.class) @NonNull AbstractFileSetCheck + required: @Initialized @NonNull AbstractFileSetCheck +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java + initialization.field.uninitialized + the default constructor does not initialize field excludeScope + private Scope excludeScope; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTag.java + argument + incompatible argument for parameter firstArg of JavadocTag. + this(line, column, tag, null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java + dereference.of.nullable + dereference of possibly-null reference matchInAngleBrackets.group(1) + typeParamName = matchInAngleBrackets.group(1).trim(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java + initialization.field.uninitialized + the default constructor does not initialize field authorFormat + private Pattern authorFormat; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java + initialization.field.uninitialized + the default constructor does not initialize field excludeScope + private Scope excludeScope; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java + initialization.field.uninitialized + the default constructor does not initialize field versionFormat + private Pattern versionFormat; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java + initialization.field.uninitialized + the default constructor does not initialize field excludeScope + private Scope excludeScope; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java + initialization.field.uninitialized + the default constructor does not initialize field ignoreNamePattern + private Pattern ignoreNamePattern; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/MissingJavadocMethodCheck.java + initialization.field.uninitialized + the default constructor does not initialize field excludeScope + private Scope excludeScope; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/MissingJavadocMethodCheck.java + initialization.field.uninitialized + the default constructor does not initialize field ignoreMethodNamesRegex + private Pattern ignoreMethodNamesRegex; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/MissingJavadocMethodCheck.java + not.interned + attempting to use a non-@Interned comparison operand + if (lcurly.getFirstChild() == rcurly) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/MissingJavadocTypeCheck.java + initialization.field.uninitialized + the default constructor does not initialize field excludeScope + private Scope excludeScope; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + argument + incompatible argument for parameter javadocInlineTag of isInlineReturnTag. + else if (inlineTag.isPresent() && isInlineReturnTag(inlineTagNode)) { +
+ found : @Initialized @Nullable DetailNode + required: @Initialized @NonNull DetailNode +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + argument + incompatible argument for parameter javadocInlineTag of isSummaryTag. + && isSummaryTag(inlineTagNode) +
+ found : @Initialized @Nullable DetailNode + required: @Initialized @NonNull DetailNode +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable DetailNode + method return type: @Initialized @NonNull DetailNode +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java + method.invocation + call to parseTags(java.lang.String[],int) not allowed on the given receiver. + parseTags(text, lineNo); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.javadoc.TagParser.class) @NonNull TagParser + required: @Initialized @NonNull TagParser +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheck.java + initialization.field.uninitialized + the default constructor does not initialize field tag + private String tag; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheck.java + initialization.field.uninitialized + the default constructor does not initialize field tagFormat + private Pattern tagFormat; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheck.java + initialization.field.uninitialized + the default constructor does not initialize field tagRegExp + private Pattern tagRegExp; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/BlockTagUtil.java + argument + incompatible argument for parameter name of TagInfo. + tags.add(new TagInfo(tagName, tagValue, position)); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/InlineTagUtil.java + argument + incompatible argument for parameter name of TagInfo. + tags.add(new TagInfo(tagName, tagValue, position)); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/InlineTagUtil.java + argument + incompatible argument for parameter source of removeLeadingJavaDoc. + matchedTagValue = removeLeadingJavaDoc(matchedTagValue); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java + argument + incompatible argument for parameter ast of ClassContext. + classesContexts.push(new ClassContext("", null)); +
+ found : null (NullType) + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java + dereference.of.nullable + dereference of possibly-null reference classesContexts.peek() + classesContexts.peek().addReferencedClassName(type.getText()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java + dereference.of.nullable + dereference of possibly-null reference classesContexts.peek() + classesContexts.peek().visitLiteralNew(ast); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java + dereference.of.nullable + dereference of possibly-null reference classesContexts.peek() + classesContexts.peek().visitLiteralThrows(ast); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java + dereference.of.nullable + dereference of possibly-null reference classesContexts.peek() + classesContexts.peek().visitType(ast); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java + initialization.fields.uninitialized + the constructor does not initialize fields: packageName + protected AbstractClassCouplingCheck(int defaultMax) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/JavaNCSSCheck.java + initialization.field.uninitialized + the default constructor does not initialize field counters + private Deque<Counter> counters; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.java + return + incompatible types in return. + return offendingModifier; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/DetectorOptions.java + assignment + incompatible types in assignment. + pattern = Optional.ofNullable(format).map(this::createPattern).orElse(null); +
+ found : @Initialized @Nullable Pattern + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/DetectorOptions.java + initialization.fields.uninitialized + the constructor does not initialize fields: reporter, format, suppressor, pattern + private DetectorOptions() { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/DetectorOptions.java + introduce.eliminate + It is bad style to create an Optional just to chain methods to get a value. + message = Optional.ofNullable(message).orElse(""); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/DetectorOptions.java + introduce.eliminate + It is bad style to create an Optional just to chain methods to get a value. + suppressor = Optional.ofNullable(suppressor).orElse(NeverSuppress.INSTANCE); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/MultilineDetector.java + initialization.fields.uninitialized + the constructor does not initialize fields: matcher, text + /* package */ MultilineDetector(DetectorOptions options) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpCheck.java + initialization.field.uninitialized + the default constructor does not initialize field matcher + private Matcher matcher; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpCheck.java + initialization.field.uninitialized + the default constructor does not initialize field message + private String message; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpMultilineCheck.java + initialization.field.uninitialized + the default constructor does not initialize field detector + private MultilineDetector detector; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpMultilineCheck.java + initialization.field.uninitialized + the default constructor does not initialize field message + private String message; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpOnFilenameCheck.java + initialization.field.uninitialized + the default constructor does not initialize field fileNamePattern + private Pattern fileNamePattern; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpOnFilenameCheck.java + initialization.field.uninitialized + the default constructor does not initialize field folderPattern + private Pattern folderPattern; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpOnFilenameCheck.java + return + incompatible types in return. + return file.getCanonicalFile().getParent(); +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineCheck.java + initialization.field.uninitialized + the default constructor does not initialize field detector + private SinglelineDetector detector; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineCheck.java + initialization.field.uninitialized + the default constructor does not initialize field message + private String message; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineJavaCheck.java + argument + incompatible argument for parameter val of suppressor. + .suppressor(suppressor) +
+ found : @Initialized @Nullable MatchSuppressor + required: @Initialized @NonNull MatchSuppressor +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineJavaCheck.java + initialization.field.uninitialized + the default constructor does not initialize field message + private String message; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ExecutableStatementCountCheck.java + argument + incompatible argument for parameter ast of Context. + context = new Context(null); +
+ found : null (NullType) + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ExecutableStatementCountCheck.java + initialization.fields.uninitialized + the constructor does not initialize fields: context + public ExecutableStatementCountCheck() { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ExecutableStatementCountCheck.java + not.interned + attempting to use a non-@Interned comparison operand + if (parent == contextAST) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java + dereference.of.nullable + dereference of possibly-null reference actualCounter + actualCounter.increment(scope); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java + dereference.of.nullable + dereference of possibly-null reference counters.peek() + final DetailAST latestDefinition = counters.peek().getScopeDefinition(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java + not.interned + attempting to use a non-@Interned comparison operand + result = latestDefinition == methodDef.getParent().getParent(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterCheck.java + introduce.eliminate + It is bad style to create an Optional just to chain methods to get a value. + return Optional.ofNullable(referencedMemberDot).orElse(referencedClassDot); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheck.java + not.interned + attempting to use a non-@Interned comparison operand + while (currentNode.getNextSibling() == null && currentNode.getParent() != ast) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SingleSpaceSeparatorCheck.java + not.interned + attempting to use a non-@Interned comparison operand + while (currentNode.getNextSibling() == null && currentNode.getParent() != parent) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadCheck.java + not.interned + attempting to use a non-@Interned comparison operand + && ast.getParent().findFirstToken(TokenTypes.RPAREN) == ast) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filefilters/BeforeExecutionExclusionFileFilter.java + initialization.field.uninitialized + the default constructor does not initialize field fileNamePattern + private Pattern fileNamePattern; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/CsvFilterElement.java + method.invocation + call to addFilter(com.puppycrawl.tools.checkstyle.filters.IntFilterElement) not allowed on the given receiver. + addFilter(new IntMatchFilterElement(matchValue)); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.filters.CsvFilterElement.class) @NonNull CsvFilterElement + required: @Initialized @NonNull CsvFilterElement +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/CsvFilterElement.java + method.invocation + call to addFilter(com.puppycrawl.tools.checkstyle.filters.IntFilterElement) not allowed on the given receiver. + addFilter(new IntRangeFilterElement(lowerBound, upperBound)); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.filters.CsvFilterElement.class) @NonNull CsvFilterElement + required: @Initialized @NonNull CsvFilterElement +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/CsvFilterElement.java + override.param + Incompatible parameter type for object. + public boolean equals(Object object) { +
+ found : @Initialized @NonNull Object + required: @Initialized @Nullable Object + Consequence: method in @Initialized @NonNull CsvFilterElement + @Initialized @NonNull boolean equals(@Initialized @NonNull CsvFilterElement this, @Initialized @NonNull Object p0) + cannot override method in @Initialized @NonNull Object + @Initialized @NonNull boolean equals(@Initialized @NonNull Object this, @Initialized @Nullable Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilterElement.java + override.param + Incompatible parameter type for object. + public final boolean equals(Object object) { +
+ found : @Initialized @NonNull Object + required: @Initialized @Nullable Object + Consequence: method in @Initialized @NonNull IntMatchFilterElement + @Initialized @NonNull boolean equals(@Initialized @NonNull IntMatchFilterElement this, @Initialized @NonNull Object p0) + cannot override method in @Initialized @NonNull Object + @Initialized @NonNull boolean equals(@Initialized @NonNull Object this, @Initialized @Nullable Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilterElement.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @Initialized @NonNull Object + required: @Initialized @Nullable Object + Consequence: method in @Initialized @NonNull IntRangeFilterElement + @Initialized @NonNull boolean equals(@Initialized @NonNull IntRangeFilterElement this, @Initialized @NonNull Object p0) + cannot override method in @Initialized @NonNull Object + @Initialized @NonNull boolean equals(@Initialized @NonNull Object this, @Initialized @Nullable Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + assignment + incompatible types in assignment. + checkPattern = null; +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + assignment + incompatible types in assignment. + checkRegexp = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + assignment + incompatible types in assignment. + columnFilter = null; +
+ found : null (NullType) + required: @Initialized @NonNull CsvFilterElement +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + assignment + incompatible types in assignment. + columnsCsv = null; +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + assignment + incompatible types in assignment. + filePattern = null; +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + assignment + incompatible types in assignment. + fileRegexp = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + assignment + incompatible types in assignment. + lineFilter = null; +
+ found : null (NullType) + required: @Initialized @NonNull CsvFilterElement +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + assignment + incompatible types in assignment. + linesCsv = null; +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + assignment + incompatible types in assignment. + messagePattern = null; +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + assignment + incompatible types in assignment. + messageRegexp = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @Initialized @NonNull Object + required: @Initialized @Nullable Object + Consequence: method in @Initialized @NonNull SuppressFilterElement + @Initialized @NonNull boolean equals(@Initialized @NonNull SuppressFilterElement this, @Initialized @NonNull Object p0) + cannot override method in @Initialized @NonNull Object + @Initialized @NonNull boolean equals(@Initialized @NonNull Object this, @Initialized @Nullable Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + argument + incompatible argument for parameter text of addTag. + addTag(matcher.group(0), line); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + assignment + incompatible types in assignment. + tagIdRegexp = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + assignment + incompatible types in assignment. + tagMessageRegexp = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + initialization.field.uninitialized + the default constructor does not initialize field idFormat + private String idFormat; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + initialization.field.uninitialized + the default constructor does not initialize field messageFormat + private String messageFormat; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + not.interned + attempting to use a non-@Interned comparison operand + if (getFileContents() != currentContents) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @Initialized @NonNull Object + required: @Initialized @Nullable Object + Consequence: method in @Initialized @NonNull Tag + @Initialized @NonNull boolean equals(@Initialized @NonNull Tag this, @Initialized @NonNull Object p0) + cannot override method in @Initialized @NonNull Object + @Initialized @NonNull boolean equals(@Initialized @NonNull Object this, @Initialized @Nullable Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + return + incompatible types in return. + return fileContentsReference.get(); +
+ type of expression: @Initialized @Nullable FileContents + method return type: @Initialized @NonNull FileContents +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + argument + incompatible argument for parameter text of Suppression. + suppression = new Suppression(offCommentMatcher.group(0), +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + argument + incompatible argument for parameter text of Suppression. + suppression = new Suppression(onCommentMatcher.group(0), +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + assignment + incompatible types in assignment. + eventIdRegexp = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + assignment + incompatible types in assignment. + eventMessageRegexp = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + initialization.field.uninitialized + the default constructor does not initialize field idFormat + private String idFormat; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + initialization.field.uninitialized + the default constructor does not initialize field messageFormat + private String messageFormat; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @Initialized @NonNull Object + required: @Initialized @Nullable Object + Consequence: method in @Initialized @NonNull Suppression + @Initialized @NonNull boolean equals(@Initialized @NonNull Suppression this, @Initialized @NonNull Object p0) + cannot override method in @Initialized @NonNull Object + @Initialized @NonNull boolean equals(@Initialized @NonNull Object this, @Initialized @Nullable Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + return + incompatible types in return. + .orElse(null); +
+ type of expression: @Initialized @Nullable Suppression + method return type: @Initialized @NonNull Suppression +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable FileText + method return type: @Initialized @NonNull FileText +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + argument + incompatible argument for parameter text of addTag. + addTag(offMatcher.group(0), line, column, TagType.OFF); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + argument + incompatible argument for parameter text of addTag. + addTag(onMatcher.group(0), line, column, TagType.ON); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + assignment + incompatible types in assignment. + tagIdRegexp = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + assignment + incompatible types in assignment. + tagMessageRegexp = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + initialization.field.uninitialized + the default constructor does not initialize field idFormat + private String idFormat; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + initialization.field.uninitialized + the default constructor does not initialize field messageFormat + private String messageFormat; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + not.interned + attempting to use a non-@Interned comparison operand + if (getFileContents() != currentContents) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @Initialized @NonNull Object + required: @Initialized @Nullable Object + Consequence: method in @Initialized @NonNull Tag + @Initialized @NonNull boolean equals(@Initialized @NonNull Tag this, @Initialized @NonNull Object p0) + cannot override method in @Initialized @NonNull Object + @Initialized @NonNull boolean equals(@Initialized @NonNull Object this, @Initialized @Nullable Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + return + incompatible types in return. + return fileContentsReference.get(); +
+ type of expression: @Initialized @Nullable FileContents + method return type: @Initialized @NonNull FileContents +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable Tag + method return type: @Initialized @NonNull Tag +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionFilter.java + initialization.field.uninitialized + the default constructor does not initialize field file + private String file; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionSingleFilter.java + initialization.field.uninitialized + the default constructor does not initialize field checks + private Pattern checks; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionSingleFilter.java + initialization.field.uninitialized + the default constructor does not initialize field columns + private String columns; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionSingleFilter.java + initialization.field.uninitialized + the default constructor does not initialize field files + private Pattern files; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionSingleFilter.java + initialization.field.uninitialized + the default constructor does not initialize field filter + private SuppressFilterElement filter; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionSingleFilter.java + initialization.field.uninitialized + the default constructor does not initialize field id + private String id; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionSingleFilter.java + initialization.field.uninitialized + the default constructor does not initialize field lines + private String lines; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionSingleFilter.java + initialization.field.uninitialized + the default constructor does not initialize field message + private Pattern message; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathFilter.java + initialization.field.uninitialized + the default constructor does not initialize field file + private String file; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathFilter.java + override.param + Incompatible parameter type for obj. + public boolean equals(Object obj) { +
+ found : @Initialized @NonNull Object + required: @Initialized @Nullable Object + Consequence: method in @Initialized @NonNull SuppressionXpathFilter + @Initialized @NonNull boolean equals(@Initialized @NonNull SuppressionXpathFilter this, @Initialized @NonNull Object p0) + cannot override method in @Initialized @NonNull Object + @Initialized @NonNull boolean equals(@Initialized @NonNull Object this, @Initialized @Nullable Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java + assignment + incompatible types in assignment. + this.checks = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java + assignment + incompatible types in assignment. + this.files = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java + assignment + incompatible types in assignment. + this.message = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java + initialization.field.uninitialized + the default constructor does not initialize field checks + private Pattern checks; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java + initialization.field.uninitialized + the default constructor does not initialize field files + private Pattern files; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java + initialization.field.uninitialized + the default constructor does not initialize field id + private String id; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java + initialization.field.uninitialized + the default constructor does not initialize field message + private Pattern message; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java + initialization.field.uninitialized + the default constructor does not initialize field query + private String query; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java + initialization.field.uninitialized + the default constructor does not initialize field xpathFilter + private XpathFilterElement xpathFilter; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + argument + incompatible argument for parameter checks of XpathFilterElement. + Optional.ofNullable(checks).map(CommonUtil::createPattern).orElse(null), +
+ found : @Initialized @Nullable Pattern + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + argument + incompatible argument for parameter contextItem of createDynamicContext. + xpathExpression.createDynamicContext(rootNode); +
+ found : @Initialized @Nullable RootNode + required: @Initialized @NonNull Item +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + argument + incompatible argument for parameter files of XpathFilterElement. + this(Optional.ofNullable(files).map(Pattern::compile).orElse(null), +
+ found : @Initialized @Nullable Pattern + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + argument + incompatible argument for parameter message of XpathFilterElement. + Optional.ofNullable(message).map(Pattern::compile).orElse(null), +
+ found : @Initialized @Nullable Pattern + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + assignment + incompatible types in assignment. + checkPattern = null; +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + assignment + incompatible types in assignment. + checkRegexp = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + assignment + incompatible types in assignment. + filePattern = null; +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + assignment + incompatible types in assignment. + fileRegexp = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + assignment + incompatible types in assignment. + messagePattern = null; +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + assignment + incompatible types in assignment. + messageRegexp = null; +
+ found : null (NullType) + required: @Initialized @NonNull Pattern +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + assignment + incompatible types in assignment. + xpathExpression = null; +
+ found : null (NullType) + required: @Initialized @NonNull XPathExpression +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + override.param + Incompatible parameter type for other. + public boolean equals(Object other) { +
+ found : @Initialized @NonNull Object + required: @Initialized @Nullable Object + Consequence: method in @Initialized @NonNull XpathFilterElement + @Initialized @NonNull boolean equals(@Initialized @NonNull XpathFilterElement this, @Initialized @NonNull Object p0) + cannot override method in @Initialized @NonNull Object + @Initialized @NonNull boolean equals(@Initialized @NonNull Object this, @Initialized @Nullable Object p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/BaseCellEditor.java + return + incompatible types in return. + return null; +
+ type of expression: null (NullType) + method return type: @Initialized @NonNull Object +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ListToTreeSelectionModelWrapper.java + method.invocation + call to getListSelectionModel() not allowed on the given receiver. + getListSelectionModel().addListSelectionListener(event -> { +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.gui.ListToTreeSelectionModelWrapper.class) @NonNull ListToTreeSelectionModelWrapper + required: @Initialized @NonNull ListToTreeSelectionModelWrapper +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ListToTreeSelectionModelWrapper.java + method.invocation + call to updateSelectedPathsFromSelectedRows() not allowed on the given receiver. + updateSelectedPathsFromSelectedRows(); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.gui.ListToTreeSelectionModelWrapper.class) @NonNull ListToTreeSelectionModelWrapper + required: @Initialized @NonNull ListToTreeSelectionModelWrapper +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + argument + incompatible argument for parameter arg0 of getImage. + setIconImage(Toolkit.getDefaultToolkit().getImage(MainFrame.class.getResource(ICON))); +
+ found : @Initialized @Nullable URL + required: @Initialized @NonNull URL +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + argument + incompatible argument for parameter event of actionPerformed. + reloadAction.actionPerformed(null); +
+ found : null (NullType) + required: @Initialized @NonNull ActionEvent +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + argument + incompatible argument for parameter sourceFile of openFile. + openFile(file); +
+ found : @Initialized @Nullable File + required: @Initialized @NonNull File +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + initialization.fields.uninitialized + the constructor does not initialize fields: textArea, xpathTextArea, treeTable + public MainFrame() { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + method.invocation + call to createContent() not allowed on the given receiver. + createContent(); +
+ found : @UnderInitialization(javax.swing.JFrame.class) @NonNull MainFrame + required: @Initialized @NonNull MainFrame +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrameModel.java + argument + incompatible argument for parameter parseTree of ParseTreeTableModel. + parseTreeTableModel = new ParseTreeTableModel(null); +
+ found : null (NullType) + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrameModel.java + initialization.fields.uninitialized + the constructor does not initialize fields: currentFile, text + public MainFrameModel() { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrameModel.java + return + incompatible types in return. + return lastDirectory; +
+ type of expression: @Initialized @Nullable File + method return type: @Initialized @NonNull File +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTableModel.java + argument + incompatible argument for parameter childIndices of fireTreeStructureChanged. + fireTreeStructureChanged(this, path, null, (Object[]) null); +
+ found : null (NullType) + required: @Initialized @NonNull int @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTableModel.java + argument + incompatible argument for parameter children of fireTreeStructureChanged. + fireTreeStructureChanged(this, path, null, (Object[]) null); +
+ found : @Initialized @NonNull Object @FBCBottom @Nullable [] + required: @Initialized @NonNull Object @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTableModel.java + method.invocation + call to setParseTree(com.puppycrawl.tools.checkstyle.api.DetailAST) not allowed on the given receiver. + setParseTree(parseTree); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.gui.ParseTreeTableModel.class) @NonNull ParseTreeTableModel + required: @Initialized @NonNull ParseTreeTableModel +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTablePresentation.java + initialization.fields.uninitialized + the constructor does not initialize fields: parseMode + public ParseTreeTablePresentation(DetailAST parseTree) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTablePresentation.java + return + incompatible types in return. + return value; +
+ type of expression: @Initialized @Nullable Object + method return type: @Initialized @NonNull Object +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + argument + incompatible argument for parameter font of getFontMetrics. + final FontMetrics fontMetrics = getFontMetrics(getFont()); +
+ found : @Initialized @Nullable Font + required: @Initialized @NonNull Font +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + argument + incompatible argument for parameter jTreeTable of ListToTreeSelectionModelWrapper. + ListToTreeSelectionModelWrapper(this); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull TreeTable + required: @Initialized @NonNull TreeTable +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + argument + incompatible argument for parameter selectionModel of setSelectionModel. + tree.setSelectionModel(selectionWrapper); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.gui.ListToTreeSelectionModelWrapper.class) @NonNull ListToTreeSelectionModelWrapper + required: @Initialized @NonNull TreeSelectionModel +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + argument + incompatible argument for parameter treeTable of TreeTableCellRenderer. + tree = new TreeTableCellRenderer(this, treeTableModel); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull TreeTable + required: @Initialized @NonNull TreeTable +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + assignment + incompatible types in assignment. + tree = new TreeTableCellRenderer(this, treeTableModel); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.gui.TreeTableCellRenderer.class) @NonNull TreeTableCellRenderer + required: @Initialized @NonNull TreeTableCellRenderer +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + initialization.fields.uninitialized + the constructor does not initialize fields: editor, xpathEditor, linePositionList + public TreeTable(ParseTreeTableModel treeTableModel) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to addMouseListener(java.awt.event.MouseListener) not allowed on the given receiver. + addMouseListener(new MouseAdapter() { +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull Component + required: @Initialized @NonNull Component +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to expandSelectedNode() not allowed on the given receiver. + expandSelectedNode(); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull TreeTable + required: @Initialized @NonNull TreeTable +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to getActionMap() not allowed on the given receiver. + getActionMap().put(command, expand); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull JComponent + required: @Initialized @NonNull JComponent +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to getInputMap() not allowed on the given receiver. + getInputMap().put(stroke, command); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull JComponent + required: @Initialized @NonNull JComponent +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to getListSelectionModel() not allowed on the given receiver. + setSelectionModel(selectionWrapper.getListSelectionModel()); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.gui.ListToTreeSelectionModelWrapper.class) @NonNull ListToTreeSelectionModelWrapper + required: @Initialized @NonNull ListToTreeSelectionModelWrapper +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to getRowHeight() not allowed on the given receiver. + final int height = getRowHeight(); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull JTable + required: @Initialized @NonNull JTable +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to setColumnsInitialWidth() not allowed on the given receiver. + setColumnsInitialWidth(); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull TreeTable + required: @Initialized @NonNull TreeTable +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to setDefaultEditor(java.lang.Class<?>,javax.swing.table.TableCellEditor) not allowed on the given receiver. + setDefaultEditor(ParseTreeTableModel.class, new TreeTableCellEditor()); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull JTable + required: @Initialized @NonNull JTable +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to setDefaultRenderer(java.lang.Class<?>,javax.swing.table.TableCellRenderer) not allowed on the given receiver. + setDefaultRenderer(ParseTreeTableModel.class, tree); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull JTable + required: @Initialized @NonNull JTable +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to setIntercellSpacing(java.awt.Dimension) not allowed on the given receiver. + setIntercellSpacing(new Dimension(0, 0)); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull JTable + required: @Initialized @NonNull JTable +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to setModel(javax.swing.table.TableModel) not allowed on the given receiver. + setModel(new TreeTableModelAdapter(treeTableModel, tree)); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull JTable + required: @Initialized @NonNull JTable +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to setRowHeight(int) not allowed on the given receiver. + setRowHeight(height); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull TreeTable + required: @Initialized @NonNull TreeTable +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to setSelectionModel(javax.swing.ListSelectionModel) not allowed on the given receiver. + setSelectionModel(selectionWrapper.getListSelectionModel()); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull JTable + required: @Initialized @NonNull JTable +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + method.invocation + call to setShowGrid(boolean) not allowed on the given receiver. + setShowGrid(false); +
+ found : @UnderInitialization(javax.swing.JTable.class) @NonNull JTable + required: @Initialized @NonNull JTable +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/JavadocMetadataScraper.java + argument + incompatible argument for parameter arg0 of add. + tokens.add(matcher.group(0)); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/JavadocMetadataScraper.java + argument + incompatible argument for parameter nodeTag of getTextFromTag. + return getTextFromTag(tagNode); +
+ found : @Initialized @Nullable DetailNode + required: @Initialized @NonNull DetailNode +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/JavadocMetadataScraper.java + initialization.field.uninitialized + the default constructor does not initialize field moduleDetails + private ModuleDetails moduleDetails; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/JavadocMetadataScraper.java + initialization.field.uninitialized + the default constructor does not initialize field rootNode + private DetailNode rootNode; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/JavadocMetadataScraper.java + method.invocation + call to <X>orElseThrow(java.util.function.Supplier<? extends X>) not allowed on the given receiver. + .orElseThrow(() -> { +
+ found : @MaybePresent Optional</*INFERENCE FAILED for:*/ ? extends Object> + required: @Present Optional</*INFERENCE FAILED for:*/ ? extends Object> +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/JavadocMetadataScraper.java + return + incompatible types in return. + .orElse(null); +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/MetadataGeneratorUtil.java + argument + incompatible argument for parameter moduleClassLoader of setModuleClassLoader. + checker.setModuleClassLoader(Checker.class.getClassLoader()); +
+ found : @Initialized @Nullable ClassLoader + required: @Initialized @NonNull ClassLoader +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/ModuleDetails.java + initialization.field.uninitialized + the default constructor does not initialize field description + private String description; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/ModuleDetails.java + initialization.field.uninitialized + the default constructor does not initialize field fullQualifiedName + private String fullQualifiedName; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/ModuleDetails.java + initialization.field.uninitialized + the default constructor does not initialize field moduleType + private ModuleType moduleType; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/ModuleDetails.java + initialization.field.uninitialized + the default constructor does not initialize field name + private String name; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/ModuleDetails.java + initialization.field.uninitialized + the default constructor does not initialize field parent + private String parent; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/ModulePropertyDetails.java + initialization.field.uninitialized + the default constructor does not initialize field defaultValue + private String defaultValue; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/ModulePropertyDetails.java + initialization.field.uninitialized + the default constructor does not initialize field description + private String description; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/ModulePropertyDetails.java + initialization.field.uninitialized + the default constructor does not initialize field name + private String name; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/ModulePropertyDetails.java + initialization.field.uninitialized + the default constructor does not initialize field type + private String type; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/ModulePropertyDetails.java + initialization.field.uninitialized + the default constructor does not initialize field validationType + private String validationType; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + argument + incompatible argument for parameter description of setDescription. + .get(0).getFirstChild().getNodeValue()); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + argument + incompatible argument for parameter description of setDescription. + .getFirstChild().getNodeValue()); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + argument + incompatible argument for parameter element of getAttributeValue. + listContent.add(getAttributeValue((Element) nodeList.item(j), attribute)); +
+ found : @Initialized @Nullable Element + required: @Initialized @NonNull Element +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + argument + incompatible argument for parameter element of getAttributeValue. + propertyDetails.setName(getAttributeValue(prop, XML_TAG_NAME)); +
+ found : @Initialized @Nullable Element + required: @Initialized @NonNull Element +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + argument + incompatible argument for parameter moduleMetadataStream of read. + moduleDetails = read(XmlMetaReader.class.getResourceAsStream("/" + fileName), +
+ found : @Initialized @Nullable InputStream + required: @Initialized @NonNull InputStream +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + dereference.of.nullable + dereference of possibly-null reference children.item(i) + if (children.item(i).getParentNode().equals(element)) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + dereference.of.nullable + dereference of possibly-null reference children.item(i).getParentNode() + if (children.item(i).getParentNode().equals(element)) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + dereference.of.nullable + dereference of possibly-null reference element.getAttributes() + return element.getAttributes().getNamedItem(attribute).getNodeValue(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + dereference.of.nullable + dereference of possibly-null reference element.getAttributes().getNamedItem(attribute) + return element.getAttributes().getNamedItem(attribute).getNodeValue(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + dereference.of.nullable + dereference of possibly-null reference getDirectChildsByTag(mod, XML_TAG_DESCRIPTION).get(0).getFirstChild() + .getFirstChild().getNodeValue()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + dereference.of.nullable + dereference of possibly-null reference getDirectChildsByTag(prop, XML_TAG_DESCRIPTION).get(0).getFirstChild() + .get(0).getFirstChild().getNodeValue()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + return + incompatible types in return. + return element.getAttributes().getNamedItem(attribute).getNodeValue(); +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable List<@Initialized @NonNull String> + method return type: @Initialized @NonNull List<@Initialized @NonNull String> +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReader.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable ModuleDetails + method return type: @Initialized @NonNull ModuleDetails +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/AnnotationUtil.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/ChainedPropertyUtil.java + argument + incompatible argument for parameter input of matcher. + final Matcher matcher = PROPERTY_VARIABLE_PATTERN.matcher(propertyValue); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull CharSequence +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + return + incompatible types in return. + return returnValue; +
+ type of expression: @Initialized @Nullable AccessModifierOption + method return type: @Initialized @NonNull AccessModifierOption +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + argument + incompatible argument for parameter replacement of replaceAll. + result = result.replaceAll("\\$" + i, matcher.group(i)); +
+ found : @Initialized @Nullable String + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + return + incompatible types in return. + return CommonUtil.class.getResource(name); +
+ type of expression: @Initialized @Nullable URL + method return type: @Initialized @NonNull URL +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + return + incompatible types in return. + return uri; +
+ type of expression: @Initialized @Nullable URI + method return type: @Initialized @NonNull URI +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtil.java + not.interned + attempting to use a non-@Interned comparison operand + if (curNode == toVisit) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtil.java + return + incompatible types in return. + return nextSibling; +
+ type of expression: @Initialized @Nullable DetailNode + method return type: @Initialized @NonNull DetailNode +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtil.java + return + incompatible types in return. + return previousSibling; +
+ type of expression: @Initialized @Nullable DetailNode + method return type: @Initialized @NonNull DetailNode +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtil.java + return + incompatible types in return. + return resultNode; +
+ type of expression: @Initialized @Nullable DetailNode + method return type: @Initialized @NonNull DetailNode +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtil.java + return + incompatible types in return. + return returnValue; +
+ type of expression: @Initialized @Nullable DetailNode + method return type: @Initialized @NonNull DetailNode +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/ScopeUtil.java + introduce.eliminate + It is bad style to create an Optional just to chain methods to get a value. + .orElseGet(() -> getDefaultScope(aMods.getParent())); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/ScopeUtil.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable Scope + method return type: @Initialized @NonNull Scope +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/ScopeUtil.java + return + incompatible types in return. + return returnValue; +
+ type of expression: @Initialized @Nullable Scope + method return type: @Initialized @NonNull Scope +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/AbstractNode.java + initialization.fields.uninitialized + the constructor does not initialize fields: children + protected AbstractNode(TreeInfo treeInfo) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/AbstractNode.java + not.interned + attempting to use a non-@Interned comparison operand + return this == nodeInfo; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/AttributeNode.java + argument + incompatible argument for parameter treeInfo of AbstractNode. + super(null); +
+ found : null (NullType) + required: @Initialized @NonNull TreeInfo +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/ElementNode.java + argument + incompatible argument for parameter name of AttributeNode. + private static final AttributeNode ATTRIBUTE_NODE_UNINITIALIZED = new AttributeNode(null, null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/ElementNode.java + argument + incompatible argument for parameter nodes of OfNodes. + getChildren().toArray(EMPTY_ABSTRACT_NODE_ARRAY)); +
+ found : @Initialized @Nullable AbstractNode @Initialized @NonNull [] + required: @Initialized @NonNull AbstractNode @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/ElementNode.java + argument + incompatible argument for parameter nodes of OfNodes. + getFollowingSiblings().toArray(EMPTY_ABSTRACT_NODE_ARRAY)); +
+ found : @Initialized @Nullable AbstractNode @Initialized @NonNull [] + required: @Initialized @NonNull AbstractNode @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/ElementNode.java + argument + incompatible argument for parameter value of AttributeNode. + private static final AttributeNode ATTRIBUTE_NODE_UNINITIALIZED = new AttributeNode(null, null); +
+ found : null (NullType) + required: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/ElementNode.java + assignment + incompatible types in assignment. + attributeNode = null; +
+ found : null (NullType) + required: @Initialized @NonNull AttributeNode +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/ElementNode.java + not.interned + attempting to use a non-@Interned comparison operand + if (attributeNode == ATTRIBUTE_NODE_UNINITIALIZED) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/ElementNode.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable String + method return type: @Initialized @NonNull String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/ElementNode.java + toarray.nullable.elements.not.newarray + call of toArray on collection of non-null elements yields an array of possibly-null elements; omit the argument to toArray or make it an explicit array constructor + getChildren().toArray(EMPTY_ABSTRACT_NODE_ARRAY)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/ElementNode.java + toarray.nullable.elements.not.newarray + call of toArray on collection of non-null elements yields an array of possibly-null elements; omit the argument to toArray or make it an explicit array constructor + getFollowingSiblings().toArray(EMPTY_ABSTRACT_NODE_ARRAY)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/RootNode.java + argument + incompatible argument for parameter nodes of OfNodes. + getChildren().toArray(EMPTY_ABSTRACT_NODE_ARRAY)); +
+ found : @Initialized @Nullable AbstractNode @Initialized @NonNull [] + required: @Initialized @NonNull AbstractNode @Initialized @NonNull [] +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/RootNode.java + return + incompatible types in return. + return null; +
+ type of expression: null (NullType) + method return type: @Initialized @NonNull NodeInfo +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/RootNode.java + toarray.nullable.elements.not.newarray + call of toArray on collection of non-null elements yields an array of possibly-null elements; omit the argument to toArray or make it an explicit array constructor + getChildren().toArray(EMPTY_ABSTRACT_NODE_ARRAY)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/XpathQueryGenerator.java + argument + incompatible argument for parameter root of getXpathQuery. + final StringBuilder xpathQueryBuilder = new StringBuilder(getXpathQuery(null, ast)); +
+ found : null (NullType) + required: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/XpathQueryGenerator.java + not.interned + attempting to use a non-@Interned comparison operand + if (child != null && child != ast) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/XpathQueryGenerator.java + not.interned + attempting to use a non-@Interned comparison operand + while (cur != root) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/XpathQueryGenerator.java + return + incompatible types in return. + XpathUtil::supportsTextAttribute).orElse(null); +
+ type of expression: @Initialized @Nullable DetailAST + method return type: @Initialized @NonNull DetailAST +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/DescendantIterator.java + assignment + incompatible types in assignment. + descendantEnum = null; +
+ found : null (NullType) + required: @Initialized @NonNull AxisIterator +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/DescendantIterator.java + dereference.of.nullable + dereference of possibly-null reference queue.poll() + descendantEnum = queue.poll().iterateAxis(AxisInfo.CHILD); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/DescendantIterator.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable NodeInfo + method return type: @Initialized @NonNull NodeInfo +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/FollowingIterator.java + assignment + incompatible types in assignment. + descendantEnum = null; +
+ found : null (NullType) + required: @Initialized @NonNull AxisIterator +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/FollowingIterator.java + assignment + incompatible types in assignment. + siblingEnum = null; +
+ found : null (NullType) + required: @Initialized @NonNull AxisIterator +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/FollowingIterator.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable NodeInfo + method return type: @Initialized @NonNull NodeInfo +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/PrecedingIterator.java + assignment + incompatible types in assignment. + descendantEnum = null; +
+ found : null (NullType) + required: @Initialized @NonNull AxisIterator +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/PrecedingIterator.java + assignment + incompatible types in assignment. + previousSiblingEnum = null; +
+ found : null (NullType) + required: @Initialized @NonNull AxisIterator +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/ReverseDescendantIterator.java + dereference.of.nullable + dereference of possibly-null reference queue.poll() + pushToStack(queue.poll().iterateAxis(AxisInfo.CHILD)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/ReverseDescendantIterator.java + method.invocation + call to pushToStack(net.sf.saxon.tree.iter.AxisIterator) not allowed on the given receiver. + pushToStack(start.iterateAxis(AxisInfo.CHILD)); +
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.xpath.iterators.ReverseDescendantIterator.class) @NonNull ReverseDescendantIterator + required: @Initialized @NonNull ReverseDescendantIterator +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/ReverseDescendantIterator.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable NodeInfo + method return type: @Initialized @NonNull NodeInfo +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/ReverseListIterator.java + assignment + incompatible types in assignment. + this.items = null; +
+ found : null (NullType) + required: @Initialized @NonNull List<? extends @Initialized @NonNull NodeInfo> +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/xpath/iterators/ReverseListIterator.java + return + incompatible types in return. + return result; +
+ type of expression: @Initialized @Nullable NodeInfo + method return type: @Initialized @NonNull NodeInfo +
+
+
diff --git a/.ci/checker-framework-suppressions/checker-framework-purity-value-returns-suppressions.xml b/.ci/checker-framework-suppressions/checker-framework-purity-value-returns-suppressions.xml new file mode 100644 index 00000000000..b0237049e22 --- /dev/null +++ b/.ci/checker-framework-suppressions/checker-framework-purity-value-returns-suppressions.xml @@ -0,0 +1,61 @@ + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter radix of parseInt. + result = Integer.parseInt(txt, radix); +
+ found : int + required: @IntRange(from=2, to=36) int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter radix of parseLong. + result = Long.parseLong(txt, radix); +
+ found : int + required: @IntRange(from=2, to=36) int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter radix of parseUnsignedInt. + result = Integer.parseUnsignedInt(txt, radix); +
+ found : int + required: @IntRange(from=2, to=36) int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java + argument + incompatible argument for parameter radix of parseUnsignedLong. + result = Long.parseUnsignedLong(txt, radix); +
+ found : int + required: @IntRange(from=2, to=36) int +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/TokenUtil.java + methodref.param + Incompatible parameter type for bitIndex + .collect(BitSet::new, BitSet::set, BitSet::or); +
+ found : @IntRangeFromNonNegative int + required: int + Consequence: method in BitSet + void set(BitSet this, @IntRangeFromNonNegative int p0) + is not a valid method reference for method in ObjIntConsumer<BitSet> + void accept(ObjIntConsumer<BitSet> this, BitSet p0, int p1) +
+
+
diff --git a/.ci/checker-framework-suppressions/checker-framework-regex-property-key-compiler-message-suppressions.xml b/.ci/checker-framework-suppressions/checker-framework-regex-property-key-compiler-message-suppressions.xml new file mode 100644 index 00000000000..0f83e6a7c1a --- /dev/null +++ b/.ci/checker-framework-suppressions/checker-framework-regex-property-key-compiler-message-suppressions.xml @@ -0,0 +1,717 @@ + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java + argument + incompatible argument for parameter key of getString. + final String pattern = resourceBundle.getString(key); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/Main.java + argument + incompatible argument for parameter regex of compile. + .map(pattern -> Pattern.compile("^" + pattern + "$")) +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java + argument + incompatible argument for parameter key of getProperty. + final String cachedConfigHash = details.getProperty(CONFIG_HASH_KEY); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java + argument + incompatible argument for parameter key of getProperty. + final String cachedHashSum = details.getProperty(location); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java + argument + incompatible argument for parameter key of getProperty. + final String cachedHashSum = details.getProperty(resource.location); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java + argument + incompatible argument for parameter key of getProperty. + final String lastChecked = details.getProperty(uncheckedFileName); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java + argument + incompatible argument for parameter key of getProperty. + return details.getProperty(name); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java + argument + incompatible argument for parameter key of setProperty. + .forEach(resource -> details.setProperty(resource.location, resource.contentHashSum)); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java + argument + incompatible argument for parameter key of setProperty. + details.setProperty(CONFIG_HASH_KEY, configHash); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java + argument + incompatible argument for parameter key of setProperty. + details.setProperty(checkedFileName, Long.toString(timestamp)); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + argument + incompatible argument for parameter key of setProperty. + returnValue.setProperty(entry.getKey(), value); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java + argument + incompatible argument for parameter key of setProperty. + returnValue.setProperty(p.getKey(), p.getValue()); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + argument + incompatible argument for parameter key of getString. + final String pattern = resourceBundle.getString(key); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/AvoidEscapedUnicodeCharactersCheck.java + argument + incompatible argument for parameter regex of compile. + + "|\"" +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/OrderedPropertiesCheck.java + argument + incompatible argument for parameter regex of compile. + return Pattern.compile(keyPatternString); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java + argument + incompatible argument for parameter regex of matches. + if (Pattern.matches(fileNameRegexp, currentFile.getName())) { +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java + argument + incompatible argument for parameter regex of replaceAll. + return fileName.replaceAll(removePattern, ""); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheck.java + argument + incompatible argument for parameter regex of compile. + return Pattern.compile(keyPatternString); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/MutableExceptionCheck.java + argument + incompatible argument for parameter regex of compile. + private Pattern extendedClassNameFormat = Pattern.compile(DEFAULT_FORMAT); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/RegexpHeaderCheck.java + argument + incompatible argument for parameter regex of compile. + headerRegexps.add(Pattern.compile(line)); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ClassImportRule.java + argument + incompatible argument for parameter regex of matches. + classMatch = forImport.matches(className); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/FileImportControl.java + argument + incompatible argument for parameter regex of compile. + return Pattern.compile(expression); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java + argument + incompatible argument for parameter regex of compile. + grp = Pattern.compile(pkg); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgImportControl.java + argument + incompatible argument for parameter regex of compile. + return Pattern.compile(expression + "(?:\\..*)?"); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgImportControl.java + argument + incompatible argument for parameter regex of compile. + return Pattern.compile(expression); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgImportRule.java + argument + incompatible argument for parameter regex of matches. + pkgMatch = !forImport.matches(pkgName + "\\..*\\..*"); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgImportRule.java + argument + incompatible argument for parameter regex of matches. + pkgMatch = forImport.matches(pkgName + "\\..*"); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheck.java + group.count + invalid groups parameter 1. Only 0 groups are guaranteed to exist for matcher. + references.add(topLevelType(matcher.group(1))); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + group.count + invalid groups parameter 1. Only 0 groups are guaranteed to exist for javadocArgMatcher. + tags.add(new JavadocTag(currentLine, col, javadocArgMatcher.group(1), + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + group.count + invalid groups parameter 1. Only 0 groups are guaranteed to exist for javadocArgMissingDescriptionMatcher. + javadocArgMissingDescriptionMatcher.group(1), + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + group.count + invalid groups parameter 1. Only 0 groups are guaranteed to exist for javadocNoargMatcher. + tags.add(new JavadocTag(currentLine, col, javadocNoargMatcher.group(1))); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + group.count + invalid groups parameter 1. Only 0 groups are guaranteed to exist for javadocTagMatchResult. + int col = javadocTagMatchResult.start(1) - 1; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + group.count + invalid groups parameter 1. Only 0 groups are guaranteed to exist for multilineCont. + final String lFin = multilineCont.group(1); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + group.count + invalid groups parameter 1. Only 0 groups are guaranteed to exist for noargCurlyMatcher. + tags.add(new JavadocTag(currentLine, col, noargCurlyMatcher.group(1))); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + group.count + invalid groups parameter 1. Only 0 groups are guaranteed to exist for noargMultilineStart. + final String param1 = noargMultilineStart.group(1); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + group.count + invalid groups parameter 1. Only 0 groups are guaranteed to exist for noargMultilineStart. + final int col = noargMultilineStart.start(1) - 1; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + group.count + invalid groups parameter 2. Only 0 groups are guaranteed to exist for javadocArgMatcher. + javadocArgMatcher.group(2))); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java + group.count + invalid groups parameter 2. Only 0 groups are guaranteed to exist for javadocArgMissingDescriptionMatcher. + javadocArgMissingDescriptionMatcher.group(2))); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheck.java + group.count + invalid groups parameter 1. Only 0 groups are guaranteed to exist for matcher. + final int contentStart = matcher.start(1); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/DetectorOptions.java + argument + incompatible argument for parameter regex of compile. + return Pattern.compile(formatValue, options); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + argument + incompatible argument for parameter regex of compile. + checkRegexp = Pattern.compile(checks); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + argument + incompatible argument for parameter regex of compile. + fileRegexp = Pattern.compile(files); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java + argument + incompatible argument for parameter regex of compile. + messageRegexp = Pattern.compile(message); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + argument + incompatible argument for parameter regex of compile. + private Pattern commentFormat = Pattern.compile(DEFAULT_COMMENT_FORMAT); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + argument + incompatible argument for parameter regex of compile. + tagCheckRegexp = Pattern.compile(format); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + argument + incompatible argument for parameter regex of compile. + tagIdRegexp = Pattern.compile(format); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java + argument + incompatible argument for parameter regex of compile. + tagMessageRegexp = Pattern.compile(format); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + argument + incompatible argument for parameter regex of compile. + eventIdRegexp = Pattern.compile(format); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + argument + incompatible argument for parameter regex of compile. + eventMessageRegexp = Pattern.compile(format); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java + argument + incompatible argument for parameter regex of compile. + eventSourceRegexp = Pattern.compile(format); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + argument + incompatible argument for parameter regex of compile. + private Pattern offCommentFormat = Pattern.compile(DEFAULT_OFF_FORMAT); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + argument + incompatible argument for parameter regex of compile. + private Pattern onCommentFormat = Pattern.compile(DEFAULT_ON_FORMAT); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + argument + incompatible argument for parameter regex of compile. + tagCheckRegexp = Pattern.compile(format); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + argument + incompatible argument for parameter regex of compile. + tagIdRegexp = Pattern.compile(format); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java + argument + incompatible argument for parameter regex of compile. + tagMessageRegexp = Pattern.compile(format); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionSingleFilter.java + argument + incompatible argument for parameter regex of compile. + this.checks = Pattern.compile(checks); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java + argument + incompatible argument for parameter regex of compile. + this.checks = Pattern.compile(checks); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java + argument + incompatible argument for parameter regex of compile. + this.files = Pattern.compile(files); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java + argument + incompatible argument for parameter regex of compile. + this.message = Pattern.compile(message); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + methodref.param + Incompatible parameter type for regex + Optional.ofNullable(message).map(Pattern::compile).orElse(null), +
+ found : @Regex String + required: String + Consequence: method in Pattern + Pattern compile(@Regex String p0) + is not a valid method reference for method in Function<String, Pattern> + Pattern apply(Function<String, Pattern> this, String p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/XpathFilterElement.java + methodref.param + Incompatible parameter type for regex + this(Optional.ofNullable(files).map(Pattern::compile).orElse(null), +
+ found : @Regex String + required: String + Consequence: method in Pattern + Pattern compile(@Regex String p0) + is not a valid method reference for method in Function<String, Pattern> + Pattern apply(Function<String, Pattern> this, String p0) +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/ChainedPropertyUtil.java + argument + incompatible argument for parameter key of getProperty. + String propertyValue = properties.getProperty(propertyName); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/ChainedPropertyUtil.java + argument + incompatible argument for parameter key of getProperty. + properties.getProperty(unresolvedPropertyName); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/ChainedPropertyUtil.java + argument + incompatible argument for parameter key of setProperty. + properties.setProperty(propertyName, propertyValue); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + argument + incompatible argument for parameter regex of compile. + Pattern.compile(pattern); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + argument + incompatible argument for parameter regex of compile. + return Pattern.compile(pattern, flags); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + argument + incompatible argument for parameter regex of replaceAll. + result = result.replaceAll("\\$" + i, matcher.group(i)); +
+ found : String + required: @Regex String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtil.java + group.count.unknown + unable to verify non-literal groups parameter. + result = result.replaceAll("\\$" + i, matcher.group(i)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/TokenUtil.java + argument + incompatible argument for parameter key of getString. + return bundle.getString(name); +
+ found : @UnknownPropertyKey String + required: @PropertyKey String +
+
+
diff --git a/.ci/checker-framework-suppressions/checker-framework-signature-gui-units-init-suppressions.xml b/.ci/checker-framework-suppressions/checker-framework-signature-gui-units-init-suppressions.xml new file mode 100644 index 00000000000..d1b17d8cbcf --- /dev/null +++ b/.ci/checker-framework-suppressions/checker-framework-signature-gui-units-init-suppressions.xml @@ -0,0 +1,1062 @@ + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java + argument + incompatible argument for parameter baseName of getBundle. + name, LOCALE, LocalizedMessage.class.getClassLoader(), +
+ found : @SignatureUnknown String + required: @BinaryName String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java + argument + incompatible argument for parameter name of forName. + clazz = Class.forName(className, true, moduleClassLoader); +
+ found : @SignatureUnknown String + required: @ClassGetName String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + argument + incompatible argument for parameter baseName of getBundle. + name, sLocale, sourceClass.getClassLoader(), new Utf8Control()); +
+ found : @SignatureUnknown String + required: @BinaryName String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java + argument + incompatible argument for parameter baseName of toBundleName. + final String bundleName = toBundleName(baseName, locale); +
+ found : @SignatureUnknown String + required: @BinaryName String +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/BaseCellEditor.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + ((CellEditorListener) listeners[i + 1]).editingCanceled(new ChangeEvent(this)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/BaseCellEditor.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + ((CellEditorListener) listeners[i + 1]).editingStopped(new ChangeEvent(this)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/BaseCellEditor.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final Object[] listeners = listenerList.getListenerList(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/BaseCellEditor.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + listenerList.add(CellEditorListener.class, listener); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/BaseCellEditor.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + listenerList.remove(CellEditorListener.class, listener); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/CodeSelector.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + editor.moveCaretPosition(pModel.getSelectionEnd()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/CodeSelector.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + editor.requestFocusInWindow(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/CodeSelector.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + editor.setCaretPosition(pModel.getSelectionStart()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/CodeSelector.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + editor.setSelectedTextColor(Color.blue); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ListToTreeSelectionModelWrapper.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final TreePath selPath = treeTable.getTree().getPathForRow(counter); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ListToTreeSelectionModelWrapper.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final int max = listSelectionModel.getMaxSelectionIndex(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ListToTreeSelectionModelWrapper.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final int min = listSelectionModel.getMinSelectionIndex(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ListToTreeSelectionModelWrapper.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + getListSelectionModel().addListSelectionListener(event -> { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ListToTreeSelectionModelWrapper.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + if (listSelectionModel.isSelectedIndex(counter)) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/Main.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + mainFrame.pack(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/Main.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + mainFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/Main.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + mainFrame.setTitle("Checkstyle GUI"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/Main.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + mainFrame.setVisible(true); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + JOptionPane.showMessageDialog(this, ex.getMessage()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + add(splitPane, BorderLayout.CENTER); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + add(xpathAreaPanel, BorderLayout.PAGE_END); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + buttonPanel.add(openFileButton); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + buttonPanel.add(reloadFileButton); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + buttonPanel.setLayout(new GridLayout(1, 2)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + expandButton.setName("expandButton"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + expandButton.setText("Expand/Collapse"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + fileChooser.setFileFilter(filter); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final Border title = BorderFactory.createTitledBorder("Xpath Query"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final File file = fileChooser.getSelectedFile(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final int returnCode = fileChooser.showOpenDialog(MainFrame.this); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + findNodeButton.setName("findNodeButton"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + findNodeButton.setText("Find node by Xpath"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + mainPanel.add(buttonPanel); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + mainPanel.add(modesPanel, BorderLayout.LINE_END); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + mainPanel.add(xpathButtonsPanel, BorderLayout.LINE_START); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + mainPanel.setLayout(new BorderLayout()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + modesCombobox.addActionListener(event -> { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + modesCombobox.setName("modesCombobox"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + modesCombobox.setSelectedIndex(0); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + modesLabel.setBorder(BorderFactory.createEmptyBorder(0, leftIndentation, 0, 0)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + modesLabel.setDisplayedMnemonic(KeyEvent.VK_M); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + modesLabel.setLabelFor(modesCombobox); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + modesPanel.add(modesCombobox); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + modesPanel.add(modesLabel); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + openFileButton.setMnemonic(KeyEvent.VK_O); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + openFileButton.setName("openFileButton"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + openFileButton.setText("Open File"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + private class ExpandCollapseAction extends AbstractAction { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + private class FileSelectionAction extends AbstractAction { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + private class FindNodeByXpathAction extends AbstractAction { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + private class ReloadAction extends AbstractAction { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + public MainFrame() { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + reloadAction.setEnabled(false); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + reloadAction.setEnabled(model.isReloadActionEnabled()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + reloadFileButton.setMnemonic(KeyEvent.VK_R); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + reloadFileButton.setText("Reload File"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + setIconImage(Toolkit.getDefaultToolkit().getImage(MainFrame.class.getResource(ICON))); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + setLayout(new BorderLayout()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + setTitle(model.getTitle()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + splitPane.setResizeWeight(0.7); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + textArea.setEditable(false); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + textAreaPanel.add(createButtonsPanel(), BorderLayout.PAGE_END); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + textAreaPanel.add(textAreaScrollPane); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + textAreaPanel.setLayout(new BorderLayout()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + xpathAreaPanel.add(createXpathButtonsPanel(), BorderLayout.PAGE_END); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + xpathAreaPanel.add(xpathTextArea); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + xpathAreaPanel.setBorder(title); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + xpathAreaPanel.setLayout(new BorderLayout()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + xpathButtonsPanel.add(expandButton); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + xpathButtonsPanel.add(findNodeButton); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + xpathButtonsPanel.setLayout(new FlowLayout()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + xpathTextArea.setName("xpathTextArea"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + xpathTextArea.setVisible(!xpathTextArea.isVisible()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/MainFrame.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + xpathTextArea.setVisible(false); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTableModel.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + ((TreeModelListener) listeners[i + 1]).treeStructureChanged(event); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTableModel.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final Object[] listeners = listenerList.getListenerList(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTableModel.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + listenerList.add(TreeModelListener.class, listener); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTableModel.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + listenerList.remove(TreeModelListener.class, listener); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + LookAndFeel.installColorsAndFont(this, "Tree.background", + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + Math.toIntExact(Math.round(getPreferredSize().getWidth() * 0.6)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + addMouseListener(new MouseAdapter() { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final Class<?> editingClass = getColumnClass(editingColumn); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final DetailAST ast = (DetailAST) tree.getLastSelectedPathComponent(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final DetailAST rootAST = (DetailAST) tree.getModel().getRoot(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final FontMetrics fontMetrics = getFontMetrics(getFont()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final KeyStroke stroke = KeyStroke.getKeyStroke("ENTER"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final MouseEvent newMouseEvent = new MouseEvent(tree, mouseEvent.getID(), + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final String xpath = xpathEditor.getText(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final TreePath selected = tree.getSelectionPath(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final int height = getRowHeight(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final int widthOfSixCharacterString = fontMetrics.stringWidth("XXXXXX"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + fontMetrics.stringWidth("XXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + for (int counter = getColumnCount() - 1; counter >= 0; + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + getActionMap().put(command, expand); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + getColumn("Column").setMaxWidth(widthOfColumnContainingSixCharacterString); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + getColumn("Line").setMaxWidth(widthOfColumnContainingSixCharacterString); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + getColumn("Tree").setPreferredWidth(preferredTreeColumnWidth); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + getColumn("Type").setPreferredWidth(preferredTypeColumnWidth); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + getInputMap().put(stroke, command); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + if (!tree.isExpanded(path)) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + if (getColumnClass(counter) == ParseTreeTableModel.class) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + if (tree != null && tree.getRowHeight() != newRowHeight) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + if (tree.getLastSelectedPathComponent() instanceof DetailAST) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + if (tree.getRowHeight() < 1) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + if (tree.isExpanded(selected)) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + mouseEvent.getWhen(), mouseEvent.getModifiersEx(), + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + mouseEvent.getX() - getCellRect(0, counter, true).x, + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + mouseEvent.getY(), mouseEvent.getClickCount(), + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + mouseEvent.isPopupTrigger()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + new CodeSelector(tree.getLastSelectedPathComponent(), editor, linePositionList).select(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + public TreeTable(ParseTreeTableModel treeTableModel) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + setDefaultEditor(ParseTreeTableModel.class, new TreeTableCellEditor()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + setDefaultRenderer(ParseTreeTableModel.class, tree); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + setIntercellSpacing(new Dimension(0, 0)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + setModel(new TreeTableModelAdapter(treeTableModel, tree)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + setSelectionModel(selectionWrapper.getListSelectionModel()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + setShowGrid(false); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + super.setRowHeight(newRowHeight); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + super.updateUI(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + tree.collapsePath(selected); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + tree.dispatchEvent(newMouseEvent); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + tree.expandPath(path); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + tree.expandPath(selected); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + tree.setRowHeight(getRowHeight()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + tree.setSelectionModel(selectionWrapper); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + tree.setSelectionPath(path); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + tree.setSelectionPath(selected); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + xpathEditor.setText(xpathEditor.getText() + NEWLINE + exception.getMessage()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTable.java + override.effect.warning.inheritance + method in com.puppycrawl.tools.checkstyle.gui.TreeTable.TreeTableCellEditor + public boolean isCellEditable(EventObject event) { +
+ isCellEditable(java.util.EventObject) + overrides a method with @UI effect in javax.swing.CellEditor + isCellEditable(java.util.EventObject) + and another method with an @AlwaysSafe effect in com.puppycrawl.tools.checkstyle.gui.BaseCellEditor + isCellEditable(java.util.EventObject) + This is discouraged. +
+
+ + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableCellRenderer.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + && treeTable.getRowHeight() != newRowHeight) { + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableCellRenderer.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + UIManager.getColor(COLOR_KEY_TABLE_SELECTION_BACKGROUND)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableCellRenderer.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + UIManager.getColor(COLOR_KEY_TABLE_SELECTION_FOREGROUND)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableCellRenderer.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final TreeCellRenderer tcr = getCellRenderer(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableCellRenderer.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + graph.translate(0, -visibleRow * getRowHeight()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableCellRenderer.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + setBackground(UIManager.getColor(colorKey)); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableCellRenderer.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + super(model); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableCellRenderer.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + super.paint(graph); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableCellRenderer.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + super.setBounds(x, 0, w, treeTable.getHeight()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableCellRenderer.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + super.setRowHeight(newRowHeight); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableCellRenderer.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + super.updateUI(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableCellRenderer.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + treeTable.setRowHeight(getRowHeight()); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableModelAdapter.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + final TreePath treePath = tree.getPathForRow(row); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableModelAdapter.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + return tree.getRowCount(); + + + + checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableModelAdapter.java + call.ui + Calling a method with UIEffect effect from a context limited to SafeEffect effects. + tree.addTreeExpansionListener(new UpdatingTreeExpansionListener()); + +
diff --git a/.ci/checker-framework.groovy b/.ci/checker-framework.groovy new file mode 100644 index 00000000000..89de899b3f7 --- /dev/null +++ b/.ci/checker-framework.groovy @@ -0,0 +1,476 @@ +import groovy.transform.EqualsAndHashCode +import groovy.transform.Field +import groovy.transform.Immutable +import groovy.util.slurpersupport.GPathResult +import groovy.util.slurpersupport.NodeChildren +import groovy.xml.XmlUtil + +import java.util.regex.Matcher +import java.util.regex.Pattern + +@Field static final String USAGE_STRING = "Usage groovy " + + ".${File.separator}.ci${File.separator}checker-framework.groovy" + + " [profile] [-g | --generate-suppression]\n" + +int exitCode = 1 +if (args.length == 2) { + exitCode = parseArgumentAndExecute(args[0], args[1]) +} +else if (args.length == 1) { + exitCode = parseArgumentAndExecute(args[0], null) +} +else { + throw new IllegalArgumentException(USAGE_STRING) +} +System.exit(exitCode) + +/** + * Parse the command line arguments passed in and execute the branch based on the arguments. + * + * @param argument command line argument + * @return {@code 0} if command executes successfully, {@code 1} otherwise + */ +private int parseArgumentAndExecute(String argument, String flag) { + final int exitCode + final Set profiles = getCheckerFrameworkProfiles() + if (profiles.contains(argument)) { + if (flag != null && flag != "-g" && flag != "--generate-suppression") { + final String exceptionMessage = "Unexpected flag: '${flag}'\n" + USAGE_STRING + throw new IllegalArgumentException(exceptionMessage) + } + exitCode = checkCheckerFrameworkReport(argument, flag) + } + else if (argument == "--list") { + println "Supported profiles:" + profiles.each { println it } + exitCode = 0 + } + else { + final String exceptionMessage = "Unexpected argument: '${argument}'\n" + USAGE_STRING + throw new IllegalArgumentException(exceptionMessage) + } + return exitCode +} + +/** + * Parse the pom.xml file to get all the available checker framework profiles. + * + * @return A set of all available checker framework profiles + */ +private static Set getCheckerFrameworkProfiles() { + final GPathResult mainNode = new XmlSlurper().parse(".${File.separator}pom.xml") + final NodeChildren ids = mainNode.profiles.profile.id as NodeChildren + final Set profiles = new HashSet<>() + ids.each { node -> + final GPathResult id = node as GPathResult + final String idText = id.text() + if (idText.startsWith("checker-framework-")) { + profiles.add(idText) + } + } + return profiles +} + +/** + * Check the generated checker framework report. Parse the errors and compare them with + * the suppressed errors. + * + * @param profile the checker framework profile to execute + * @param flag command line argument flag to determine output format + * @return {@code 0} if checker framework report is as expected, {@code 1} otherwise + */ +private static int checkCheckerFrameworkReport(String profile, String flag) { + final XmlParser xmlParser = new XmlParser() + final String suppressedErrorsFileUri = + ".${File.separator}.ci${File.separator}" + + "checker-framework-suppressions${File.separator}${profile}-suppressions.xml" + final List checkerFrameworkErrors = getCheckerFrameworkErrors(profile) + Set errors = Collections.emptySet() + if (!checkerFrameworkErrors.isEmpty()) { + errors = getErrorFromText(checkerFrameworkErrors) + } + final File suppressionFile = new File(suppressedErrorsFileUri) + Set suppressedErrors = Collections.emptySet() + if (suppressionFile.exists()) { + final Node suppressedErrorsNode = xmlParser.parse(suppressedErrorsFileUri) + suppressedErrors = getSuppressedErrors(suppressedErrorsNode) + } + return compareErrors(errors, suppressedErrors, flag) +} + +/** + * Generates the checker framework report and filters out the errors. + * + * @param profile the checker framework profile to execute + * @return A set of errors + */ +private static List> getCheckerFrameworkErrors(String profile) { + final List checkerFrameworkLines = [] as ArrayList + final String command = "mvn -e --no-transfer-progress clean compile -P${profile}" + final Process process = getOsSpecificCmd(command).execute() + process.in.eachLine { line -> + checkerFrameworkLines.add(line) + println(line) + } + process.waitFor() + final List> checkerFrameworkErrors = [][] as ArrayList + for (int index = 0; index < checkerFrameworkLines.size(); index++) { + final String line = checkerFrameworkLines.get(index) + if (line.startsWith("[WARNING]")) { + final List error = [] as ArrayList + error.add(line) + int currentErrorIndex = index + 1 + while (currentErrorIndex < checkerFrameworkLines.size()) { + final String currentLine = checkerFrameworkLines.get(currentErrorIndex) + if (currentLine.startsWith("[ERROR]") + || currentLine.startsWith("[INFO]") + || currentLine.startsWith("[WARNING]")) { + break + } + error.add(currentLine) + currentErrorIndex++ + } + checkerFrameworkErrors.add(error) + } + } + return checkerFrameworkErrors +} + +/** + * Get OS specific command. + * + * @param cmd input command + * @return OS specific command + */ +private static String getOsSpecificCmd(String cmd) { + final String osSpecificCmd + if (System.getProperty("os.name").toLowerCase().contains('windows')) { + osSpecificCmd = "cmd /c ${cmd}" + } + else { + osSpecificCmd = cmd + } + return osSpecificCmd +} + +/** + * Get a set of {@link CheckerFrameworkError} from text. + * + * @param errorsText errors in text format + * @return A set of errors + */ +private static Set getErrorFromText(List> errorsList) { + final Set errors = new HashSet<>() + final Pattern errorExtractingPattern = Pattern + .compile(".*[\\\\/](checkstyle[\\\\/]src.*\\.java):\\[(\\d+)[^]]*][^\\[]*\\[([^]]*)](.*)") + final Pattern filePathExtractingPattern = Pattern.compile("\\[WARNING] (.*\\.java)") + final int fileNameGroup = 1 + final int lineNumberGroup = 2 + final int specifierGroup = 3 + final int messageGroup = 4 + errorsList.each { errorList -> + final String error = errorList.get(0) + final Matcher matcher = errorExtractingPattern.matcher(error) + final List details = [] as ArrayList + String fileName = null + String specifier = null + String message = null + String lineContent = null + int lineNumber = 0 + if (matcher.matches()) { + fileName = matcher.group(fileNameGroup) + lineNumber = Integer.parseInt(matcher.group(lineNumberGroup)) + specifier = XmlUtil.escapeXml(matcher.group(specifierGroup).trim()) + message = XmlUtil.escapeXml(matcher.group(messageGroup).trim()) + + final Matcher filePathMatcher = filePathExtractingPattern.matcher(error) + if (filePathMatcher.find()) { + final String absoluteFilePath = filePathMatcher.group(1) + final File file = new File(absoluteFilePath) + lineContent = XmlUtil.escapeXml(file.readLines().get(lineNumber - 1).trim()) + } + + if (errorList.size() > 1) { + for (int index = 1; index < errorList.size(); index++) { + final String errorDetail = XmlUtil.escapeXml(errorList.get(index).trim()) + if (!errorDetail.isEmpty()) { + details.add(errorDetail) + } + } + } + + // Errors extracted from Checker Framework Report are by default considered stable. + final boolean isUnstable = false + final CheckerFrameworkError checkerFrameworkError = new CheckerFrameworkError( + fileName, specifier, message, details, lineContent, lineNumber, isUnstable) + errors.add(checkerFrameworkError) + } + } + return errors +} + +/** + * Get the suppressed error. All child nodes of the main {@code suppressedErrors} node + * are parsed. + * + * @param mainNode the main {@code suppressedErrors} node + * @return A set of suppressed errors + */ +private static Set getSuppressedErrors(Node mainNode) { + final List children = mainNode.children() + final Set suppressedErrors = new HashSet<>() + + children.each { node -> + final Node errorNode = node as Node + suppressedErrors.add(getError(errorNode)) + } + return suppressedErrors +} + +/** + * Construct the {@link CheckerFrameworkError} object from the {@code checkerFrameworkError} + * XML node. The suppression file is parsed to get the {@code checkerFrameworkError} node. + * + * @param errorNode the {@code error} XML node + * @return {@link CheckerFrameworkError} object represented by the {@code error} XML node + */ +private static CheckerFrameworkError getError(Node errorNode) { + final List childNodes = errorNode.children() + + final List details = [] as ArrayList + String fileName = null + String specifier = null + String message = null + String lineContent = null + final int lineNumber = -1 + childNodes.each { + final Node childNode = it as Node + final String text = childNode.name() + + final String childNodeText = XmlUtil.escapeXml(childNode.text()) + switch (text) { + case "fileName": + fileName = childNodeText + break + case "specifier": + specifier = childNodeText + break + case "message": + message = childNodeText + break + case "lineContent": + lineContent = childNodeText + break + case "details": + final String[] detailsArray = childNodeText.split("\\n") + detailsArray.each { detail -> + final String detailString = detail.trim() + if (!detailString.isEmpty()) { + details.add(detailString) + } + } + } + } + + final String unstableAttributeValue = errorNode.attribute("unstable") + final boolean isUnstable = Boolean.parseBoolean(unstableAttributeValue) + + return new CheckerFrameworkError(fileName, specifier, message, details, lineContent, + lineNumber, isUnstable) +} + +/** + * Compare the actual and the suppressed errors. The comparison passes successfully + * (i.e. returns 0) when: + *
    + *
  1. Surviving and suppressed errors are equal.
  2. + *
  3. There are extra suppressed errors but they are unstable + * i.e. {@code unstable="true"}.
  4. + *
+ * The comparison fails when (i.e. returns 1) when: + *
    + *
  1. Surviving errors are not present in the suppressed list.
  2. + *
  3. There are errors in the suppression list that are not there is surviving list.
  4. + *
+ * + * @param actualErrors A set of actual errors reported by error prone + * @param suppressedErrors A set of suppressed errors from suppression file + * @param flag command line argument flag to determine output format + * @return {@code 0} if comparison passes successfully + */ +private static int compareErrors(Set actualErrors, + Set suppressedErrors, + String flag) { + final Set unsuppressedErrors = + setDifference(actualErrors, suppressedErrors) + final Set extraSuppressions = + setDifference(suppressedErrors, actualErrors) + + final int exitCode + if (actualErrors == suppressedErrors) { + exitCode = 0 + } + else if (unsuppressedErrors.isEmpty() + && !hasOnlyStableErrors(extraSuppressions)) { + exitCode = 0 + } + else { + if (!unsuppressedErrors.isEmpty()) { + println "New surviving error(s) found:" + unsuppressedErrors.each { + printError(flag, it) + } + } + if (!extraSuppressions.isEmpty() + && extraSuppressions.any { !it.isUnstable() }) { + println "\nUnnecessary suppressed error(s) found and should be removed:" + extraSuppressions.each { + if (!it.isUnstable()) { + printError(flag, it) + } + } + } + exitCode = 1 + } + + if (exitCode == 0) { + println "Build successful with no errors." + } + + return exitCode +} + +/** + * Whether a set has only stable errors. + * + * @param errors A set of errors + * @return {@code true} if a set has only stable errors + */ +private static boolean hasOnlyStableErrors(Set errors) { + return errors.every { !it.isUnstable() } +} + +/** + * Prints the error according to the nature of the flag. + * + * @param flag command line argument flag to determine output format + * @param error error to print + */ +private static void printError(String flag, CheckerFrameworkError error) { + if (flag != null) { + println error.toXmlString() + } + else { + println error + } +} + +/** + * Determine the difference between 2 sets. The result is {@code setOne - setTwo}. + * + * @param setOne The first set in the difference + * @param setTwo The second set in the difference + * @return {@code setOne - setTwo} + */ +private static Set setDifference(final Set setOne, + final Set setTwo) { + final Set result = new TreeSet<>(setOne) + result.removeIf { error -> setTwo.contains(error) } + return result +} + +/** + * A class to represent the XML {@code checkerFrameworkError} node. + */ +@EqualsAndHashCode(excludes = ["lineNumber", "unstable"]) +@Immutable +class CheckerFrameworkError implements Comparable { + + /** + * Error nodes present in suppressions file do not have a {@code lineNumber}. + * The {@code lineNumber} is set to {@code -1} for such errors. + */ + private static final int LINE_NUMBER_NOT_PRESENT_VALUE = -1 + + String fileName + String specifier + String message + List details + String lineContent + int lineNumber + boolean unstable + + @Override + String toString() { + String toString = """ + File Name: "${getFileName()}" + Specifier: "${getSpecifier()}" + Message: "${getMessage()}" + Line Contents: "${getLineContent()}\"""".stripIndent() + if (getLineNumber() != LINE_NUMBER_NOT_PRESENT_VALUE) { + toString += '\nLine Number: ' + getLineNumber() + } + + final List details = getDetails() + if (!details.isEmpty()) { + toString += '\nDetails: ' + details.get(0) + if (details.size() > 1) { + for (int index = 1; index < details.size(); index++) { + toString += '\n' + ' ' * 9 + details.get(index) + } + } + } + return toString + } + + @Override + int compareTo(CheckerFrameworkError other) { + int i = getFileName() <=> other.getFileName() + if (i != 0) { + return i + } + + i = getSpecifier() <=> other.getSpecifier() + if (i != 0) { + return i + } + + i = getMessage() <=> other.getMessage() + if (i != 0) { + return i + } + + i = getLineContent() <=> other.getLineContent() + if (i != 0) { + return i + } + + return this.getDetails().join('') <=> other.getDetails().join('') + } + + /** + * XML format of the checker framework error. + * + * @return XML format of the checker framework error + */ + String toXmlString() { + final List details = getDetails() + String toXmlString = """ + + ${getFileName()} + ${getSpecifier()} + ${getMessage()} + ${getLineContent()} + """.stripIndent(10) + if (!details.isEmpty()) { + toXmlString += "
" + getDetails().each { + toXmlString += '\n' + ' ' * 6 + it + } + toXmlString += "\n
\n" + } + toXmlString += "
" + return toXmlString + } + +} diff --git a/.ci/jsoref-spellchecker/exclude.pl b/.ci/jsoref-spellchecker/exclude.pl index 8477537a310..886a99274fd 100755 --- a/.ci/jsoref-spellchecker/exclude.pl +++ b/.ci/jsoref-spellchecker/exclude.pl @@ -17,6 +17,7 @@ /openjdk17-excluded\.files$ ^cdg-pitest-licence.txt$ ^.teamcity/ + ^.ci/checker-framework-suppressions/ ); my $exclude = join "|", @excludes; while (<>) { diff --git a/.ci/jsoref-spellchecker/whitelist.words b/.ci/jsoref-spellchecker/whitelist.words index 2f2fd85cdfd..6e25e429c48 100644 --- a/.ci/jsoref-spellchecker/whitelist.words +++ b/.ci/jsoref-spellchecker/whitelist.words @@ -95,6 +95,7 @@ avoidnestedblocks avoidnoargumentsuperconstructorcall avoidstarimport avoidstaticimport +Awarns aws awt azurewebsites @@ -162,6 +163,7 @@ Cacheable cachefile cacio caciocavallosilano +calledmethods callstack camelcase casegroup @@ -204,6 +206,7 @@ CHDHJECF CHDJBFDB checkchmod checkconfig +checkerframework checkstyle checkstyleanttask checkstylemeta @@ -255,6 +258,7 @@ commerical commitish commonutil Compat +compilermsgs Comspace concat config @@ -438,6 +442,7 @@ FDCF Fdesign FDF FEF +fenum ffd fff FFFD @@ -538,6 +543,7 @@ Gsp GString Gtk gui +guieffect gwt gx gz @@ -607,6 +613,7 @@ Incompatabilities indentcontinuationlines Inet infinispan +initializedfields Inlined inlining innerassignment @@ -823,6 +830,7 @@ markdownlint Massol matchxpath mavenbadge +maxmem maxmethods mct mdl @@ -830,6 +838,7 @@ MDM mebigfatguy mega membername +meminitial metadata methodcount methodlength @@ -914,6 +923,7 @@ newlineatendoffile Nfc NFF Nfo +nformatter Niederhauser nikitasavinov nio @@ -1095,6 +1105,7 @@ PRMC programpractice Proguard propertycachefile +propkey prot PROTECTE protonpack @@ -1149,8 +1160,10 @@ releasenotesxml remkop requireemptylinebeforeblocktaggroup requirethis +resourceleak Rethrown returncount +returnsreceiver reviewdog revwalk rfc @@ -1501,6 +1514,8 @@ xg Xhenseval XHTML xm +Xmaxerrs +Xmaxwarns xml XMLHTTP xmllogger diff --git a/.github/workflows/checker-framework.yml b/.github/workflows/checker-framework.yml new file mode 100644 index 00000000000..c4472e3d17d --- /dev/null +++ b/.github/workflows/checker-framework.yml @@ -0,0 +1,37 @@ +name: Checker-Framework + +on: + push: + branches: + - master + pull_request: + +jobs: + checker-framework: + strategy: + fail-fast: false + matrix: + profile: + - checker-framework-nullness-optional-interning + - checker-framework-methods-resource-fenum + - checker-framework-lock-tainting + - checker-framework-index + - checker-framework-formatter + - checker-framework-signature-gui-units-init + - checker-framework-regex-property-key-compiler-message + - checker-framework-purity-value-returns + + runs-on: ubuntu-latest + steps: + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Install groovy + run: sudo apt install groovy + - name: Checkout + uses: actions/checkout@v2 + - name: Execute checker framework + run: groovy ./.ci/checker-framework.groovy ${{ matrix.profile }} + env: + MAVEN_OPTS: "-Xmx4g" diff --git a/config/checkstyle_non_main_files_suppressions.xml b/config/checkstyle_non_main_files_suppressions.xml index ceda03a170a..62e072182c4 100644 --- a/config/checkstyle_non_main_files_suppressions.xml +++ b/config/checkstyle_non_main_files_suppressions.xml @@ -92,6 +92,9 @@ + + + diff --git a/pom.xml b/pom.xml index 76ed009b3b2..8461f8929f0 100644 --- a/pom.xml +++ b/pom.xml @@ -220,6 +220,7 @@ 10.0 2.12.0 + 3.10.1 11 1.9.5 10 @@ -233,6 +234,7 @@ 3.3 1.2.0 2.15.0 + 3.25.0 @@ -255,6 +257,12 @@ com.google.guava guava 31.1-jre + + + org.checkerframework + checker-qual + + org.apache.ant @@ -387,6 +395,11 @@ + + org.checkerframework + checker-qual + ${checkerframework.version} + @@ -748,7 +761,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + ${maven.compiler.plugin.version} ${java.version} ${java.version} @@ -2289,7 +2302,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + ${maven.compiler.plugin.version} @@ -2341,7 +2354,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + ${maven.compiler.plugin.version} @@ -2387,6 +2400,477 @@ + + + checker-framework-nullness-optional-interning + + + + maven-compiler-plugin + ${maven.compiler.plugin.version} + + + true + false + 1024m + 4048m + + 10000 + 10000 + + + + org.checkerframework + checker + ${checkerframework.version} + + + + org.checkerframework.checker.nullness.NullnessChecker + org.checkerframework.checker.optional.OptionalChecker + org.checkerframework.checker.interning.InterningChecker + + + + -Awarns + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + + + + + + + + true + + + + org.checkerframework + checker + 3.25.0 + + + + + + checker-framework-methods-resource-fenum + + + + maven-compiler-plugin + ${maven.compiler.plugin.version} + + + true + false + 1024m + 4048m + + 10000 + 10000 + + + + org.checkerframework + checker + ${checkerframework.version} + + + + org.checkerframework.checker.calledmethods.CalledMethodsChecker + org.checkerframework.checker.resourceleak.ResourceLeakChecker + org.checkerframework.checker.fenum.FenumChecker + + + + -Awarns + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + + + + + + + + true + + + + org.checkerframework + checker + 3.25.0 + + + + + + checker-framework-lock-tainting + + + + maven-compiler-plugin + ${maven.compiler.plugin.version} + + + true + false + 1024m + 4048m + + 10000 + 10000 + + + + org.checkerframework + checker + ${checkerframework.version} + + + + org.checkerframework.checker.lock.LockChecker + org.checkerframework.checker.tainting.TaintingChecker + + + + -Awarns + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + + + + + + + + true + + + + org.checkerframework + checker + 3.25.0 + + + + + + checker-framework-index + + + + maven-compiler-plugin + ${maven.compiler.plugin.version} + + + true + false + 1024m + 4048m + + 10000 + 10000 + + + + org.checkerframework + checker + ${checkerframework.version} + + + + org.checkerframework.checker.index.IndexChecker + + + + -Awarns + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + + + + + + + + true + + + + org.checkerframework + checker + 3.25.0 + + + + + + checker-framework-formatter + + + + maven-compiler-plugin + ${maven.compiler.plugin.version} + + + true + false + 1024m + 4048m + + 10000 + 10000 + + + + org.checkerframework + checker + ${checkerframework.version} + + + + org.checkerframework.checker.formatter.FormatterChecker + org.checkerframework.checker.i18nformatter.I18nFormatterChecker + + + + -Awarns + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + + + + + + + + true + + + + org.checkerframework + checker + 3.25.0 + + + + + + checker-framework-signature-gui-units-init + + + + maven-compiler-plugin + ${maven.compiler.plugin.version} + + + true + false + 1024m + 4048m + + 10000 + 10000 + + + + org.checkerframework + checker + ${checkerframework.version} + + + + org.checkerframework.checker.signature.SignatureChecker + org.checkerframework.checker.guieffect.GuiEffectChecker + org.checkerframework.checker.units.UnitsChecker + org.checkerframework.common.initializedfields.InitializedFieldsChecker + + + + -Awarns + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + + + + + + + + true + + + + org.checkerframework + checker + 3.25.0 + + + + + + checker-framework-regex-property-key-compiler-message + + + + maven-compiler-plugin + ${maven.compiler.plugin.version} + + + true + false + 1024m + 4048m + + 10000 + 10000 + + + + org.checkerframework + checker + ${checkerframework.version} + + + + org.checkerframework.checker.regex.RegexChecker + org.checkerframework.checker.propkey.PropertyKeyChecker + org.checkerframework.checker.compilermsgs.CompilerMessagesChecker + + + + -Awarns + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + + + + + + + + true + + + + org.checkerframework + checker + 3.25.0 + + + + + + checker-framework-purity-value-returns + + + + maven-compiler-plugin + ${maven.compiler.plugin.version} + + + true + false + 1024m + 4048m + + 10000 + 10000 + + + + org.checkerframework + checker + ${checkerframework.version} + + + + org.checkerframework.framework.util.PurityChecker + org.checkerframework.common.value.ValueChecker + org.checkerframework.common.returnsreceiver.ReturnsReceiverChecker + + + + -Awarns + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + + + + + + + + true + + + + org.checkerframework + checker + 3.25.0 + + + + + pitest-misc