Skip to content

Releases: typetools/checker-framework

Checker Framework 3.43.0

01 May 20:01
Compare
Choose a tag to compare

Version 3.43.0 (May 1, 2024)

User-visible changes:

Method, constructor, lambda, and method reference type inference has been greatly improved. The -AconservativeUninferredTypeArguments option is no longer necessary and has been removed.

Renamed command-line arguments:

  • -AskipDirs has been renamed to -AskipFiles.
    -AskipDirs will continue to work for the time being.

New command-line arguments:

  • -AonlyFiles complements -AskipFiles

A specialized inference algorithm for the Resource Leak Checker runs automatically as part of whole-program inference.

Implementation details:

Deprecated ObjectCreationNode#getConstructor in favor of new ObjectCreationNode#getTypeToInstantiate().

Renamed AbstractCFGVisualizer.visualizeBlockHelper() to visualizeBlockWithSeparator().

Moved methods from TreeUtils to subclasses of TreeUtilsAfterJava11:

  • isConstantCaseLabelTree
  • isDefaultCaseLabelTree
  • isPatternCaseLabelTree

Renamed BaseTypeVisitor.checkForPolymorphicQualifiers() to warnInvalidPolymorphicQualifier().

Closed issues:

#979, #4559, #4593, #5058, #5734, #5781, #6071, #6093, #6239, #6297, #6317, #6322, #6346, #6373, #6376, #6378, #6379, #6380, #6389, #6393, #6396, #6402, #6406, #6407, #6417, #6421, #6430, #6433, #6438, #6442, #6473, #6480, #6507, #6531, #6535.

Checker Framework 3.42.0

15 Dec 23:37
Compare
Choose a tag to compare

Version 3.42.0 (December 15, 2023)

User-visible changes:

Method annotation @AssertMethod indicates that a method checks a value and possibly throws an assertion. Using it can make flow-sensitive type refinement more effective.

In org.checkerframework.common.util.debug, renamed EmptyProcessor to DoNothingProcessor.
Removed org.checkerframework.common.util.report.DoNothingChecker.
Moved ReportChecker from org.checkerframework.common.util.report to org.checkerframework.common.util.count.report.

Checker Framework 3.41.0

04 Dec 17:52
Compare
Choose a tag to compare

Version 3.41.0 (December 4, 2023)

User-visible changes:

New command-line options:
-AassumePureGetters Unsoundly assume that every getter method is pure

Implementation details:

Added method isDeterministic() to the AnnotationProvider interface.

CFAbstractValue#leastUpperBound and CFAbstractValue#widenUpperBound are now final. Subclasses should override method CFAbstractValue#upperBound(V, TypeMirror, boolean) instead.

Closed issues:

#1497, #3345, #6037, #6204, #6276, #6282, #6290, #6296, #6319, #6327.

Checker Framework 3.40.0

01 Nov 19:10
Compare
Choose a tag to compare

Version 3.40.0 (November 1, 2023)

User-visible changes:

Optional Checker: checker-util.jar defines OptionalUtil.castPresent() for suppressing false positive warnings from the Optional Checker.

Closed issues:

#4947, #6179, #6215, #6218, #6222, #6247, #6259, #6260.

Checker Framework 3.39.0

02 Oct 17:38
Compare
Choose a tag to compare

Version 3.39.0 (October 2, 2023)

User-visible changes:

The Checker Framework runs on a version 21 JVM. It does not yet soundly check all new Java 21 language features, but it does not
crash when compiling them.

Implementation details:

Dataflow supports all the new Java 21 language features.

  • A new node,DeconstructorPatternNode, was added, so any implementation of NodeVisitor must be updated.
  • Method InstanceOfNode.getBindingVariable() is deprecated; use getPatternNode() or getBindingVariables() instead.

WPI uses 1-based indexing for formal parameters and arguments.

Closed issues:

#5911, #5967, #6155, #6173, #6201.

Checker Framework 3.38.0

01 Sep 14:06
Compare
Choose a tag to compare

Version 3.38.0 (September 1, 2023)

User-visible changes:

Eliminated the @SignedPositiveFromUnsigned annotation, which users were advised against using.

Implementation details:

Renamed SourceChecker.processArg()' to processErrorMessageArg()`.

Closed issues:

#2156, #5672, #6110, #6111, #6116, #6125, #6129, #6136.

Checker Framework 3.37.0

01 Aug 17:58
Compare
Choose a tag to compare

Version 3.37.0 (August 1, 2023)

User-visible changes:

Removed support for deprecated option -AuseDefaultsForUncheckedCode.

The Signedness Checker no longer allows (nor needs) @UnknownSignedness to be written on a non-integral type.

Implementation details:

QualifierHierarchy:

  • The constructor takes an AnnotatedTypeFactory.
  • Changes to isSubtype():
    • isSubtype() has been renamed to isSubypeQualifiers() and made protected. Clients that are not in a qualifier hierarchy should call isSubtypeShallow() or, rarely, new method isSubtypeQualifiersOnly().
    • New public method isSubtypeShallow()' that takes two more arguments than isSubypeQualifiers()`.
  • Similar changes to greatestLowerBound() and leastUpperBound().

Closed issues:

#6076, #6077, #6078, #6098, #6100, #6104, #6113.

Checker Framework 3.36.0

03 Jul 21:56
Compare
Choose a tag to compare

Version 3.36.0 (July 3, 2023)

User-visible changes:

The Initialization Checker issues a cast.unsafe warning instead of an initialization.cast error.

The Resource Leak Checker now issues a required.method.not.known error when an expression with type @MustCallUnknown has a must-call obligation (e.g., because it is a parameter annotated as @Owning).

The Resource Leak Checker's default MustCall type for type variables has been changed from @MustCallUnknown to @MustCall({}). This change reduces the number of false positive warnings in code that uses type variables but not resources. However, it makes some code that uses type variables and resources unverifiable with any annotation.

Implementation details:

Deprecated ElementUtils.getSimpleNameOrDescription() in favor of getSimpleDescription().

Renamed methods in AnnotatedTypeMirror.
The old versions are deprecated. Because the *PrimaryAnnotation* methods might not return an annotation of a type variable or wildcard, it is better to call getEffectiveAnnotation* or hasEffectiveAnnotation* instead.

  • clearAnnotations*() => clearPrimaryAnnotations()
  • getAnnotation*() => getPrimaryAnnotation*().
  • hasAnnotation*() => hasPrimaryAnnotation().
  • removeAnnotation*() => removePrimaryAnnotation*().
  • isAnnotatedInHierarchy() => hasPrimaryAnnotationInHierarchy()
  • removeNonTopAnnotationInHierarchy() should not be used.

Dataflow Framework:

  • New ExpressionStatementNode marks an expression that is used as a statement.
  • Removed class StringConcatenateAssignmentNode, which is now desugared.

GenericAnnotatedTypeFactory:

  • Renamed getTypeFactoryOfSubchecker() to getTypeFactoryOfSubcheckerOrNull.
  • Added new getTypeFactoryOfSubchecker() that never returns null.

Return types changed:

  • GenericAnnotatedTypeFactory.getFinalLocalValues() return type changed to Map, though the returned value is still a HashMap.
  • BaseTypeChecker.getImmediateSubcheckerClasses() return type changed to Set, though the returned value is still a LinkedHashSet.

Renamed methods in CFAbstractValue:

  • combineOneAnnotation() => combineAnnotationWithTypeVar()
  • combineNoAnnotations() => combineTwoTypeVars()

Closed issues:
#5908, #5936, #5971, #6019, #6025, #6028, #6030, #6039, #6053, #6060, #6069.

Checker Framework 3.35.0

01 Jun 18:22
Compare
Choose a tag to compare

Version 3.35.0 (June 1, 2023)

User-visible changes:

The Checker Framework no longer issues type.checking.not.run errors. This reduces clutter in the output.

Signedness Checker:

  • The receiver type of Object.hashCode() is now @UnknownSignedness.

Implementation details:

Instead of overriding isRelevant(), a type factory implementation should override isRelevantImpl(). Clients should continue to call isRelevant(); never call isRelevantImpl().

Methods that now return a boolean rather than void:

  • commonAssignmentCheck()
  • checkArrayInitialization()
  • checkLock()
  • checkLockOfThisOrTree()
  • ensureExpressionIsEffectivelyFinal()

Methods that now return AnnotationMirrorSet instead of Set<? extends AnnotationMirror>:

  • getTopAnnotations()
  • getBottomAnnotations()
  • getDefaultTypeDeclarationBounds()
  • getExceptionParameterLowerBoundAnnotations()

Renamed BaseTypeVisitor.checkExtendsImplements() to checkExtendsAndImplements().

Class FieldInvariants:

  • constructor now takes an AnnotatedTypeFactory
  • isSuperInvariant() has been renamed to isStrongerThan() and no longer takes an AnnotatedTypeFactory

CFAbstractValue.validateSet() takes a type factory rather than a QualifierHierarchy.

Removed methods that have been deprecated for over two years.

Closed issues:

#4170, #5722, #5777, #5807, #5821, #5826, #5829, #5837, #5930.

Checker Framework 3.34.0

02 May 15:55
Compare
Choose a tag to compare

Version 3.34.0 (May 2, 2023)

User-visible changes:

The Checker Framework runs under JDK 20 -- that is, it runs on a version 20 JVM.

Explicit lambda parameters are defaulted the same as method parameters. For example, in (String s) -> {...} the type of s is @NonNull String.

Implementation details:

Renamings in AnnotatedTypeFactory:

  • prepareCompilationUnitForWriting() => wpiPrepareCompilationUnitForWriting()
  • prepareClassForWriting() => wpiPrepareClassForWriting()
  • prepareMethodForWriting() => wpiPrepareMethodForWriting() and changed its signature by adding two formal parameters

Closed issues:
#803, #5739, #5749, #5767, #5781, #5787.