Checker Framework v3.8.0 Release Notes

Release Date: 2020-12-01 // almost 3 years ago
  • 🔖 Version 3.8.0, December 1, 2020

    The Initialized Fields Checker warns when a field is not initialized by a constructor. This is more general than the Initialization Checker, which only checks that @NonNull fields are initialized.

    🏗 The manual describes how to modify an sbt build file to run the Checker Framework.

    The -AwarnUnneededSuppressions command-line option warns only about suppression strings that contain a checker name.

    The -AwarnUnneededSuppressionsExceptions=REGEX command-line option partially disables -AwarnUnneededSuppressions. Most users don't need this.

    Implementation details:

    ➕ Added classes SubtypeIsSubsetQualifierHierarchy and SubtypeIsSupersetQualifierHierarchy.

    🚚 Moved the contractsUtils field from the visitor to the type factory.

    Class renamings:

    • ContractsUtils => ContractsFromMethod

    Method renamings:

    • ElementUtils.getVerboseName => ElementUtils.getQualifiedName
    • ElementUtils.getSimpleName => ElementUtils.getSimpleSignature

    Field renamings:

    • AnnotatedTypeMirror.actualType => AnnotatedTypeMirror.underlyingType

    ➕ Added a formal parameter to methods in MostlyNoElementQualifierHierarchy:

    • leastUpperBoundWithElements
    • greatestLowerBoundWithElements

    ✂ Removed a formal parameter from methods in BaseTypeVisitor:

    • checkPostcondition
    • checkConditionalPostcondition

    In Analysis.runAnalysisFor(), changed boolean parameter to enum BeforeOrAfter.

    ✂ Removed org.checkerframework.framework.util.AnnotatedTypes#getIteratedType; use AnnotatedTypeFactory#getIterableElementType(ExpressionTree) instead.

    Closed issues:
    #3287, #3390, #3681, #3839, #3850, #3851, #3862, #3871, #3884, #3888, #3908, #3929, #3932, #3935.


Previous changes from v3.7.1

  • 🔖 Version 3.7.1, November 2, 2020

    👍 The Constant Value Checker supports two new annotations: @EnumVal and @MatchesRegex.

    👍 The Nullness Checker supports annotation org.jspecify.annotations.NullnessUnspecified.

    Implementation details:

    AnnotatedIntersectionType#directSuperTypes now returns List<? extends AnnotatedTypeMirror>.

    ⚠ The @RelevantJavaTypes annotation is now enforced: a checker issues a warning if the programmer writes a type annotation on a type that is not listed.

    🗄 Deprecated CFAbstractTransfer.getValueWithSameAnnotations(), which is no longer used. Added new methods getWidenedValue() and getNarrowedValue().

    ✅ Renamed TestUtilities.assertResultsAreValid() to TestUtilities.assertTestDidNotFail().

    📇 Renamed BaseTypeValidator.isValidType() to BaseTypeValidator.isValidStructurally().

    🆕 New method BaseTypeVisitor#visitAnnotatedType(List, Tree) centralizes checking of user-written type annotations, even when parsed in declaration locations.

    Closed issues:
    #868, #1908, #2075, #3349, #3362, #3569, #3614, #3637, #3709, #3710, #3711, #3720, #3730, #3742, #3760, #3770, #3775, #3776, #3792, #3793, #3794, #3819, #3831.