All Versions
27
Latest Version
Avg Release Cycle
29 days
Latest Release
166 days ago

Changelog History
Page 1

  • v3.8.0 Changes

    December 01, 2020

    ๐Ÿ”– 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.

  • v3.7.1 Changes

    November 02, 2020

    ๐Ÿ”– 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.

  • v3.7.0 Changes

    October 01, 2020

    ๐Ÿ”– Version 3.7.0, October 1, 2020

    ๐Ÿ— The new Called Methods Checker tracks methods that have definitely been called on an object. It automatically supports detecting mis-uses of the builder pattern in code that uses Lombok or AutoValue.

    ๐Ÿ‘ Accumulation analysis is now supported via a generic Accumulation Checker. An accumulation analysis is a restricted form of typestate analysis that does not require a precise alias analysis for soundness. The Called Methods Checker is an accumulation analysis.

    ๐Ÿ‘ The Nullness Checker supports annotations org.codehaus.commons.nullanalysis.NotNull, org.codehaus.commons.nullanalysis.Nullable, and org.jspecify.annotations.Nullable.

    ๐Ÿ‘ The Signature Checker supports annotations @CanonicalName and @CanonicalNameOrEmpty.
    The Signature Checker treats jdk.jfr.Unsigned as an alias for its own @Unsigned annotation.

    The shorthand syntax for the -processor command-line argument applies to
    utility checkers, such as the Constant Value Checker.

    Implementation details:

    A checker implementation may override AnnotatedTypeFactory.getWidenedAnnotations
    to provide special behavior for primitive widening conversions.

    ๐Ÿšš Deprecated org.checkerframework.framework.util.MultiGraphQualifierHierarchy and org.checkerframework.framework.util.GraphQualifierHierarchy. Removed AnnotatedTypeFactory#createQualifierHierarchy(MultiGraphFactory) and AnnotatedTypeFactory#createQualifierHierarchyFactory.
    ๐Ÿ‘€ See Javadoc of MultiGraphQualifierHierarchy for instructions on how to use the new classes and methods.

    ๐Ÿ“‡ Renamed methods:
    NumberUtils.isFloatingPoint => TypesUtils.isFloatingPoint
    NumberUtils.isIntegral => TypesUtils.isIntegralPrimitiveOrBoxed
    NumberUtils.isPrimitiveFloatingPoint => TypeKindUtils.isFloatingPoint
    NumberUtils.isPrimitiveIntegral => TypeKindUtils.isIntegral
    NumberUtils.unboxPrimitive => TypeKindUtils.primitiveOrBoxedToTypeKind
    TypeKindUtils.widenedNumericType => TypeKindUtils.widenedNumericType
    TypesUtils.isFloating => TypesUtils.isFloatingPrimitive
    TypesUtils.isIntegral => TypesUtils.isIntegralPrimitive

    The CFStore copy constructor now takes only one argument.

    Closed issues:
    #352, #354, #553, #722, #762, #2208, #2239, #3033, #3105, #3266, #3275, #3408, #3561, #3616, #3619, #3622, #3625, #3630, #3632, #3648, #3650, #3667, #3668, #3669, #3700, #3701.

  • v3.6.1

    September 02, 2020
  • v3.6.0 Changes

    August 03, 2020

    ๐Ÿ”– Version 3.6.0, August 3, 2020

    ๐Ÿ‘ The Interning Checker supports method annotations @EqualsMethod and @CompareToMethod. Place them on methods like equals(), compareTo(), and compare() to permit certain uses of == on non-interned values.

    โž• Added an overloaded version of NullnessUtil.castNonNull that takes an error message.

    โž• Added a new option -Aversion to print the version of the Checker Framework.

    ๐Ÿ†• New CFGVisualizeLauncher command-line arguments:

    • --outputdir: directory in which to write output files
    • ๐Ÿ–จ --string: print the control flow graph in the terminal
      All CFGVisualizeLauncher command-line arguments now start with -- instead of -.

    Implementation details:

    โšก๏ธ commonAssignmentCheck() now takes an additional argument. Type system authors must update their overriding implementations.

    0๏ธโƒฃ Renamed GenericAnnotatedTypeFactory#addAnnotationsFromDefaultQualifierForUse to #addAnnotationsFromDefaultForType and BaseTypeValidator#shouldCheckTopLevelDeclaredType to #shouldCheckTopLevelDeclaredOrPrimitiveType

    โœ‚ Removed org.checkerframework.framework.test.FrameworkPer(Directory/File)Test classes. Use CheckerFrameworkPer(Directory/File)Test instead.

    Closed issues:
    #1395, #2483, #3207, #3223, #3224, #3313, #3381, #3422, #3424, #3428, #3429, #3438, #3442, #3443, #3447, #3449, #3461, #3482, #3485, #3495, #3500, #3528.

  • v3.5.0 Changes

    July 01, 2020

    ๐Ÿ”– Version 3.5.0, July 1, 2020

    ๐Ÿ‘€ Use "allcheckers:" instead of "all:" as a prefix in a warning suppression string. Writing @SuppressWarnings("allcheckers") means the same thing as @SuppressWarnings("all"), unless the -ArequirePrefixInWarningSuppressions command-line argument is supplied. See the manual for details.

    It is no longer necessary to pass -Astubs=checker.jar/javadoc.astub when compiling a program that uses Javadoc classes.

    ๐Ÿ“‡ Renamed command-line arguments:

    • โš  -AshowSuppressWarningKeys to -AshowSuppressWarningsStrings

    The Signature Checker no longer considers Java keywords to be identifiers.
    ๐Ÿ“‡ Renamed Signature Checker annotations:
    ๐Ÿ“ฆ @BinaryNameInUnnamedPackage => @BinaryNameWithoutPackage
    ๐Ÿ“ฆ @FieldDescriptorForPrimitiveOrArrayInUnnamedPackage => @FieldDescriptorWithoutPackage
    ๐Ÿ“ฆ @IdentifierOrArray => @ArrayWithoutPackage
    โž• Added new Signature Checker annotations:
    @BinaryNameOrPrimitiveType
    @DotSeparatedIdentifiersOrPrimitiveType

    IdentifierOrPrimitiveType

    ๐Ÿ‘• The Nullness Checker now treats System.getProperty() soundly. Use -Alint=permitClearProperty to disable special treatment of System.getProperty() and to permit undefining built-in system properties.

    Class qualifier parameters: When a generic class represents a collection, a user can write a type qualifier on the type argument, as in List<@Tainted Character> versus List<@Untainted Character>. When a non-generic class represents a collection with a hard-coded type (as StringBuffer hard-codes Character), you can use the new class qualifier parameter feature to distinguish StringBuffers that contain different types of characters.

    ๐Ÿ‘€ The Dataflow Framework supports backward analysis. See its manual.

    Implementation details:

    ๐Ÿ”„ Changed the types of some fields and methods from array to List:

    • 0๏ธโƒฃ QualifierDefaults.validLocationsForUncheckedCodeDefaults()
    • QualifierDefaults.STANDARD_CLIMB_DEFAULTS_TOP
    • QualifierDefaults.STANDARD_CLIMB_DEFAULTS_BOTTOM
    • QualifierDefaults.STANDARD_UNCHECKED_DEFAULTS_TOP
    • QualifierDefaults.STANDARD_UNCHECKED_DEFAULTS_BOTTOM

    Dataflow Framework: Analysis is now an interface. Added AbstractAnalysis, ForwardAnalysis, ForwardTransferFunction, ForwardAnalysisImpl, BackwardAnalysis, BackwardTransferFunction, and BackwardAnalysisImpl.
    To adapt existing code:

    • extends Analysis<V, S, T> => extends ForwardAnalysisImpl<V, S, T>
    • implements TransferFunction<V, S> => implements ForwardTransferFunction<V, S>

    In AbstractQualifierPolymorphism, use AnnotationMirrors instead of sets of annotation mirrors.

    โš  Renamed meta-annotation SuppressWarningsKeys to SuppressWarningsPrefix.
    โš  Renamed SourceChecker#getSuppressWarningsKeys(...) to getSuppressWarningsPrefixes.
    โš  Renamed SubtypingChecker#getSuppressWarningsKeys to getSuppressWarningsPrefixes.

    โž• Added GenericAnnotatedTypeFactory#postAnalyze, changed signature of GenericAnnotatedTypeFactory#handleCFGViz, and removed CFAbstractAnalysis#visualizeCFG.

    โœ‚ Removed methods and classes marked deprecated in release 3.3.0 or earlier.

    Closed issues:
    #1362, #1727, #2632, #3249, #3296, #3300, #3356, #3357, #3358, #3359, #3380.

  • v3.4.1 Changes

    June 01, 2020

    ๐Ÿ”– Version 3.4.1, June 1, 2020

    -Ainfer now takes an argument:

    • -Ainfer=jaifs uses .jaif files to store the results of whole-program inference.
    • -Ainfer=stubs uses .astub files to store the results of whole-program inference.
    • ๐Ÿ—„ -Ainfer is deprecated but is the same as -Ainfer=jaifs, for backwards compatibility.

    ๐Ÿ†• New command-line option:
    -AmergeStubsWithSource If both a stub file and a source file are available, use both.

    Closed issues:
    2893, 3021, 3128, 3160, 3232, 3277, 3285, 3289, 3295, 3302, 3305, 3307, 3310, 3316, 3318, 3329.

  • v3.4.0 Changes

    May 03, 2020

    ๐Ÿ”– Version 3.4.0, May 3, 2020

    ๐Ÿšš The annotated jdk8.jar is no longer used. You should remove any occurrence of

      -Xbootclasspath/p:.../jdk8.jar
    

    ๐Ÿ— from your build scripts. Annotations for JDK 8 are included in checker.jar.

    The Returns Receiver Checker enables documenting and checking that a method returns its receiver (i.e., the this parameter).

    Closed issues:
    3267, 3263, 3217, 3212, 3201, 3111, 3010, 2943, 2930.

  • v3.3.0 Changes

    April 01, 2020

    ๐Ÿ”– Version 3.3.0, April 1, 2020

    ๐Ÿ†• New command-line options:
    ๐Ÿ‘• -Alint=trustArrayLenZero trust @arraylen(0) annotations when determining the type of Collections.toArray.

    Renamings:
    0๏ธโƒฃ -AuseDefaultsForUncheckedCode to -AuseConservativeDefaultsForUncheckedCode
    ๐Ÿš€ The old name works temporarily but will be removed in a future release.

    ๐Ÿšš For collection methods with Object formal parameter type, such as contains, indexOf, and remove, the annotated JDK now forbids null as an argument. To make the Nullness Checker permit null, pass -Astubs=checker.jar/collection-object-parameters-may-be-null.astub.

    โš  The argument to @SuppressWarnings can be a substring of a message key that extends at each end to a period or an end of the key. (Previously, any substring worked, including the empty string which suppressed all warnings. Use "all" to suppress all warnings.)

    All postcondition annotations are repeatable (e.g., @EnsuresNonNull, @EnsuresNonNullIf, ...).

    ๐Ÿ“‡ Renamed wrapper annotations (which users should not write):

    • 0๏ธโƒฃ @DefaultQualifiers => @DefaultQualifier.List
    • @EnsuresQualifiersIf => @EnsuresQualifierIf.List
    • @EnsuresQualifiers => @EnsuresQualifier.List
    • @RequiresQualifiers => @RequiresQualifier.List

    Implementation details:

    • โœ‚ Removed @DefaultInUncheckedCodeFor and @DefaultQualifierInHierarchyInUncheckedCode.
    • Renamings:
      0๏ธโƒฃ applyUncheckedCodeDefaults() to applyConservativeDefaults()
      0๏ธโƒฃ useUncheckedCodeDefault() to useConservativeDefault()
      AnnotatedTypeReplacer to AnnotatedTypeCopierWithReplacement
      AnnotatedTypeMerger to AnnotatedTypeReplacer
    • ๐Ÿ—„ Deprecated the framework.source.Result class; use DiagMessage or List<DiagMessage> instead. If you were creating a Result just to pass it to report, then call new methods reportError and reportWarning instead.
    • AbstractTypeProcessor#typeProcessingOver() always gets called.

    Closed issues:
    1307, 1881, 1929, 2432, 2793, 3040, 3046, 3050, 3056, 3083, 3124, 3126, 3129, 3132, 3139, 3149, 3150, 3167, 3189.

  • v3.2.0 Changes

    March 02, 2020

    ๐Ÿ”– Version 3.2.0, March 2, 2020

    โš  @SuppressWarnings("initialization") suppresses only warnings whose key contains "initialization". Previously, it suppressed all warnings issued by the Nullness Checker or the Initialization Checker.

    Closed issues:
    2719, 3001, 3020, 3069, 3093, 3120.