Checker Framework 3.32.0-eisop1
Version 3.32.0-eisop1 (March 9, 2023)
User-visible changes:
The new command-line argument -AcheckEnclosingExpr
enables type checking for
enclosing expression types of inner class instantiations. This fixes an
unsoundness, in particular for the Nullness Initialization Checker, which did
not detect the use of an uninitialized outer class for an inner class
instantiation.
The option is off by default to avoid many false-positive errors.
Implementation details:
Added method AnnotatedExecutableType.getVarargType
to access the vararg type
of a method/constructor.
This allows us to remove usages of AnnotatedTypes.adaptParameters()
.
A VariableDeclarationNode
is now correctly added to the CFG for the binding
variable in a BindingPatternTree
.
Remove the fastAssemble
task which is subsumed by assembleForJavac
.
Successfully compiles with Java 20 and 21.
Closed issues:
#282, #310, #312, typetools#5672.
Version 3.32.0 (March 2, 2023)
User-visible changes:
Fixed a bug in the Nullness Checker where a call to a side-effecting method did
not make some formal parameters possibly-null. The Nullness Checker is likely
to issue more warnings for your code. For ways to eliminate the new warnings,
see https://checkerframework.org/manual/#type-refinement-side-effects .
If you supply the -AinvocationPreservesArgumentNullness
command-line
option, the Nullness Checker unsoundly assumes that arguments passed to
non-null parameters in an invocation remain non-null after the invocation.
This assumption is unsound in general, but it holds for most code.
(EISOP note: contrary to this description, one needs to use
-AinvocationPreservesArgumentNullness=false
to get the unsound behavior.
EISOP keeps only the -AconservativeArgumentNullnessAfterInvocation
option,
introduced in version 3.25.0-eisop1, which this typetools option is based on.)
Implementation details:
Moved TreeUtils.isAutoGeneratedRecordMember(Element)
to ElementUtils
.
(EISOP note: originally introduced the method in the correct location in Version 3.27.0-eisop1.)
Renamed TreeUtils.instanceOfGetPattern()
to TreeUtils.instanceOfTreeGetPattern()
.
(EISOP note: EISOP performed this renaming in Version 3.21.2-eisop1.)
Deprecated AnnotatedTypes#isExplicitlySuperBounded
and AnnotatedTypes#isExplicitlyExtendsBounded
because they are duplicates of #hasExplicitSuperBound
and #hasExplicitExtendsBound
.
Version 3.31.0 (February 17, 2023)
User-visible changes:
Command-line argument -AshowPrefixInWarningMessages
puts the checker name
on the first line of each warning and error message.
Signedness Checker changes:
- Cast expressions are not subject to type refinement. When a programmer
writes a cast such as(@Signed int) 2
, it is not refined to
@SignednessGlb
and cannot be used in an unsigned context. - When incompatible arguments are passed to
@PolySigned
formal parameters,
the error is expressed in terms of@SignednessBottom
rather than the
greatest lower bound of the argument types.
Implementation details:
Moved AnnotationMirrorSet
and AnnotationMirrorMap
from
org.checkerframework.framework.util
to org.checkerframework.javacutil
.
Changed uses of Set<AnnotationMirror>
to AnnotationMirrorSet
including in APIs.
Removed methods from AnnotationUtils that are no longer useful:
createAnnotationMap
, createAnnotationSet
, createUnmodifiableAnnotationSet
.
Closed issues:
typetools#5597.
Version 3.30.0 (February 2, 2023)
Implementation details:
getQualifierKind()
throws an exception rather than returning null.
(EISOP note: this method is in ElementQualifierHierarchy
and QualifierKindHierarchy
.)
Renamed Gradle task copyJarsToDist
to assembleForJavac
.
Closed issues:
typetools#5402, typetools#5486, typetools#5489, typetools#5519, typetools#5524, typetools#5526.
Version 3.29.0 (January 5, 2023)
User-visible changes:
Dropped support for -ApermitUnsupportedJdkVersion
command-line argument.
You can now run the Checker Framework under any JDK version, without a warning.
(EISOP note: a note is however still issued. Use the EISOP option
-AnoJreVersionCheck
to also suppress the note.)
Pass -Astubs=permit-nullness-assertion-exception.astub
to not be warned about null
pointer exceptions within nullness assertion methods like Objects.requireNonNull
.
Pass -Astubs=sometimes-nullable.astub
to unsoundly permit passing null to
calls if null is sometimes but not always permitted.
Closed issues:
typetools#5412, typetools#5431, typetools#5435, typetools#5438, typetools#5447, typetools#5450, typetools#5453, typetools#5471, typetools#5472, typetools#5487.