Checker Framework 3.39.0-eisop1 #607
wmdietl
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Version 3.39.0-eisop1 (October 22, 2023)
User-visible changes:
The Initialization Checker is now separated from the Nullness Checker.
To unsoundly use the Nullness Checker without initialization checking, use the new
-AassumeInitialized
command-line argument.
Error messages will now be either from the Initialization Checker or the Nullness Checker, which
simplifies the types in error messages.
@SuppressWarnings("initialization")
should be used to suppress initialization warnings.In this release,
nullness
continues to suppress warnings from the Initialization Checker, whilenullnessnoinit
may be used to suppress warnings from the Nullness Checker only. A future releasewill make suppression behavior consistent with other checkers.
The Initialization Checker supports the new qualifier
@PolyInitialized
to express qualifier polymorphism.Fixed a bug in the Nullness Checker where an instance receiver is incorrectly marked non-null after
a static method or field access. This could lead to new nullness errors. The static access should be
changed to be through a class name.
Checkers now enforce
@TargetLocations
meta-annotations: if a qualifier is declared with themeta-annotation
@TargetLocations({TypeUseLocation...})
, the qualifier should only be applied tothese type use locations.
The new command-line argument
-AignoreTargetLocations
disables validating the target locationsof qualifiers. This option is not enabled by default. With this flag, the checker ignores all
@TargetLocations
meta-annotations and allows all qualifiers to be applied to every type use.Implementation details:
Corrected the arguments to an
ObjectCreationNode
when the node refers to ananonymous constructor invocation with an explicit enclosing expression in Java 11+.
Now the first argument is not treated as an enclosing expression if it is not.
Deprecated
ObjectCreationNode#getConstructor
in favor of newObjectCreationNode#getTypeToInstantiate()
.Removed class
StringConcatenateAssignmentNode
and its last usages.The class was deprecated in release 3.21.3-eisop1 (March 23, 2022) and no longer used in CFGs.
Changed the return types of
BaseTypeChecker#getImmediateSubcheckerClasses()
and overrides toSet<Class<? extends BaseTypeChecker>>
,AnalysisResult#getFinalLocalValues()
toMap<VariableElement, V>
, andGenericAnnotatedTypeFactory#getFinalLocalValues()
toMap<VariableElement, Value>
.Closed issues:
#297, #376, #400, #519, #532, #533, typetools#1590, typetools#1919.
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 langauge features.
DeconstructorPatternNode
, was added, so any implementation ofNodeVisitor
must be updated.InstanceOfNode.getBindingVariable()
is deprecated; usegetPatternNode()
orgetBindingVariables()
instead.WPI uses 1-based indexing for formal parameters and arguments.
Closed issues:
typetools#5911, typetools#5967, typetools#6155, typetools#6173, typetools#6201.
Version 3.38.0 (September 1, 2023)
User-visible changes:
Eliminated the
@SignedPositiveFromUnsigned
annotation, which users wereadvised against using.
Implementation details:
Renamed
SourceChecker.processArg()' to
processErrorMessageArg()`.Closed issues:
typetools#2156, typetools#5672, typetools#6110, typetools#6111, typetools#6116, typetools#6125, typetools#6129, typetools#6136.
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
:AnnotatedTypeFactory
.isSubtype()
:isSubtype()
has been renamed toisSubypeQualifiers()
and made protected.Clients that are not in a qualifier hierarchy should call
isSubtypeShallow()
or, rarely, new method
isSubtypeQualifiersOnly()
.isSubtypeShallow()' that takes two more arguments than
isSubypeQualifiers()`.greatestLowerBound()
andleastUpperBound()
.Closed issues:
typetools#6076, typetools#6077, typetools#6078, typetools#6098, typetools#6100, typetools#6104, typetools#6113.
Version 3.36.0 (July 3, 2023)
User-visible changes:
The Initialization Checker issues a
cast.unsafe
warning instead of aninitialization.cast
error.The Resource Leak Checker now issues a
required.method.not.known
errorwhen 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 thenumber 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 ofgetSimpleDescription()
.Renamed methods in
AnnotatedTypeMirror
.The old versions are deprecated. Because the
*PrimaryAnnotation*
methodsmight not return an annotation of a type variable or wildcard, it is better to
call
getEffectiveAnnotation*
orhasEffectiveAnnotation*
instead.clearAnnotations*()
=>clearPrimaryAnnotations()
getAnnotation*()
=>getPrimaryAnnotation*()
.hasAnnotation*()
=>hasPrimaryAnnotation()
.removeAnnotation*()
=>removePrimaryAnnotation*()
.isAnnotatedInHierarchy()
=>hasPrimaryAnnotationInHierarchy()
removeNonTopAnnotationInHierarchy()
should not be used.(EISOP note: these renamings break javac convention and are inconsistently applied.
Only the last two changes are retained.)
Dataflow Framework:
ExpressionStatementNode
marks an expression that is used as a statement.StringConcatenateAssignmentNode
, which is now desugared.(EISOP note: these were performed in 3.21.2-eisop1 and 3.21.3-eisop1, respectively.)
GenericAnnotatedTypeFactory
:getTypeFactoryOfSubchecker()
togetTypeFactoryOfSubcheckerOrNull
.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:
typetools#5908, typetools#5936, typetools#5971, typetools#6019, typetools#6025, typetools#6028, typetools#6030, typetools#6039, typetools#6053, typetools#6060, typetools#6069.
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:
Object.hashCode()
is now@UnknownSignedness
.Implementation details:
Instead of overriding
isRelevant()
, a type factory implementation shouldoverride
isRelevantImpl()
. Clients should continue to callisRelevant()
;never call
isRelevantImpl()
except assuper.isRelevantImpl()
.Methods that now return a
boolean
rather thanvoid
:commonAssignmentCheck()
checkArrayInitialization()
checkLock()
checkLockOfThisOrTree()
ensureExpressionIsEffectivelyFinal()
Methods that now return
AnnotationMirrorSet
instead ofSet<? extends AnnotationMirror>
:getTopAnnotations()
getBottomAnnotations()
getDefaultTypeDeclarationBounds()
getExceptionParameterLowerBoundAnnotations()
Renamed
BaseTypeVisitor.checkExtendsImplements()
tocheckExtendsAndImplements()
.Class
FieldInvariants
:AnnotatedTypeFactory
isSuperInvariant()
has been renamed toisStrongerThan()
andno longer takes an
AnnotatedTypeFactory
CFAbstractValue.validateSet()
takes a type factory rather than aQualifierHierarchy
.Removed methods that have been deprecated for over two years.
Closed issues:
typetools#4170, typetools#5722, typetools#5777, typetools#5807, typetools#5821, typetools#5826, typetools#5829, typetools#5837, typetools#5930.
This discussion was created from the release Checker Framework 3.39.0-eisop1.
Beta Was this translation helpful? Give feedback.
All reactions