Checker Framework 3.36.0
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()
togetTypeFactoryOfSubcheckerOrNull
. - Added new
getTypeFactoryOfSubchecker()
that never returns null.
Return types changed:
GenericAnnotatedTypeFactory.getFinalLocalValues()
return type changed toMap
, though the returned value is still aHashMap
.BaseTypeChecker.getImmediateSubcheckerClasses()
return type changed toSet
, though the returned value is still aLinkedHashSet
.
Renamed methods in CFAbstractValue
:
combineOneAnnotation()
=>combineAnnotationWithTypeVar()
combineNoAnnotations()
=>combineTwoTypeVars()
Closed issues:
#5908, #5936, #5971, #6019, #6025, #6028, #6030, #6039, #6053, #6060, #6069.