Skip to content

Releases: typetools/checker-framework

Checker Framework 3.6.0

03 Aug 20:45
Compare
Choose a tag to compare

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.

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.

Checker Framework 3.5.0

01 Jul 21:26
Compare
Choose a tag to compare

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:

  • 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.

Checker Framework 3.4.1

01 Jun 20:32
Compare
Choose a tag to compare

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.

Checker Framework 3.4.0

03 May 20:23
Compare
Choose a tag to compare

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.

Checker Framework 3.3.0

01 Apr 23:27
Compare
Choose a tag to compare

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:
-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):

  • @DefaultQualifiers => @DefaultQualifier.List
  • @EnsuresQualifiersIf => @EnsuresQualifierIf.List
  • @EnsuresQualifiers => @EnsuresQualifier.List
  • @RequiresQualifiers => @RequiresQualifier.List

Implementation details:

  • Removed @DefaultInUncheckedCodeFor and @DefaultQualifierInHierarchyInUncheckedCode.
  • Renamings:
    applyUncheckedCodeDefaults() to applyConservativeDefaults()
    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.

Checker Framework 3.2.0

02 Mar 20:35
Compare
Choose a tag to compare

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.

Checker Framework 3.1.1

03 Feb 18:44
Compare
Choose a tag to compare

Version 3.1.1, February 3, 2020

New command-line options:
-AassumeDeterministic Unsoundly assume that every method is deterministic
-AassumePure Unsoundly assume that every method is pure

Renamed -Anocheckjdk to -ApermitMissingJdk. The old version still works, for backward compatibility.

Renamed -Alint=forbidnonnullarraycomponents to -Alint=soundArrayCreationNullness. The old version still works, for backward compatibility.

Implementation details:

  • Deprecated QualifierHierarchy#getTypeQualifiers.
  • Deprecated Analysis#Analysis(ProcessingEnvironment) and Analysis#Analysis(T, int, ProcessingEnvironment); use Analysis#Analysis(), Analysis#Analysis(int), Analysis#Analysis(T), and Analysis#Analysis(T, int) instead.

Closed issues:

2181, 2975, 3018, 3022, 3032, 3036, 3037, 3038, 3041, 3049, 3055, 3076.

Checker Framework 3.1.0

03 Jan 21:39
Compare
Choose a tag to compare

Version 3.1.0, January 3, 2020

Command-line option -AprintGitProperties prints information about the git repository from which the Checker Framework was compiled.

Implementation details:

  • Removed static cache in AnnotationUtils#areSameByClass and added
    AnnotatedTypeFactory#areSameByClass that uses an instance cache.
  • Removed static cache in AnnotationBuilder#fromName and #fromClass.
  • ContractsUtils#getPreconditions takes an ExecutableElement as an argument.
  • ContractsUtils#getContracts returns a Set.
  • Moved ContractUtils.Contract to outer level.
  • Renamed ConditionalPostcondition#annoResult to ConditionalPostcondition#resultValue.

Closed issues:

2867, 2897, 2972.

Checker Framework 3.0.1

02 Dec 23:15
Compare
Choose a tag to compare

Version 3.0.1, December 2, 2019

New command-line option for the Constant Value Checker -AnoNullStringsConcatenation unsoundly assumes that every operand of a String concatenation is non-null.

Implementation details:

  • Moved AnnotatedTypes#hasTypeQualifierElementTypes to AnnotationUtils.
  • Deprecated AnnotatedTypes#isTypeAnnotation and AnnotatedTypes#hasTypeQualifierElementTypes.

Closed issues:

945, 1224, 2024, 2744, 2809, 2815, 2818, 2830, 2840, 2853, 2854, 2865, 2873, 2874, 2878, 2880, 2886, 2888, 2900, 2905, 2919, 2923.

Checker Framework 3.0.0

01 Nov 22:42
Compare
Choose a tag to compare

Version 3.0.0, November 1, 2019

The Checker Framework works on both JDK 8 and JDK 11.

  • Type annotations for JDK 8 remain in jdk8.jar.
  • Type annotations for JDK 11 appear in stub files in checker.jar.

Removed the @PolyAll annotation.

Implementation details:

  • Removed all previously deprecated methods.
  • AnnotatedTypeFactory#getFnInterfaceFromTree now returns an AnnotatedExecutableType.
  • AnnotationUtils#areSame and #areSameByName now only accept non-null AnnotationMirrors

Closed issues:
1169, 1654, 2081, 2703, 2739, 2749, 2779, 2781, 2798, 2820, 2824, 2829, 2842, 2845, 2848.