Annotation File Utilities Changelog
This is the changelog for the
Annotation File Utilities.
-
Version 3.48.3 (released December 2, 2024):
-
Version 3.48.2 (released November 1, 2024):
-
Version 3.48.1 (released October 11, 2024):
-
Version 3.48.0 (released October 2, 2024):
-
Version 3.47.0 (released September 4, 2024):
- Runs under JDK 23 -- that is, it runs on a version 23 JVM.
-
Version 3.46.0 (released August 1, 2024):
-
Version 3.45.0 (released July 1, 2024):
-
Version 3.44.0 (released June 3, 2024):
-
Version 3.43.0 (released May 1, 2024):
-
Version 3.42.0 (released December 15, 2023):
-
Version 3.41.0 (released December 4, 2023):
-
Version 3.40.0 (released November 1, 2023):
-
Version 3.39.0 (released October 2, 2023):
- Runs under JDK 21 -- that is, it runs on a version 21 JVM.
-
Version 3.38.0 (released September 1, 2023):
-
Version 3.37.0 (released August 1, 2023):
-
Version 3.36.0 (released July 3, 2020):
- Minor bug fixes and improvements.
- Fixed issues
#582.
-
Version 3.35.0 (released June 1, 2023):
- Runs under JDK 20 -- that is, it runs on a version 20 JVM.
-
Version 3.34.0 (released May 2, 2023):
-
Version 3.33.0 (released April 3, 2023):
- Requires JDK 11 to build. Still runs on JDK 8 or later.
- Command-line option
--comments
is no longer supported.
-
Version 3.32.0 (released March 2, 2023):
-
Version 3.31.0 (released February 17, 2023):
-
Version 3.30.0 (released February 2, 2023):
-
Version 3.29.0 (released January 5, 2023):
-
Version 3.28.0 (released December 1, 2022):
-
Version 3.27.0 (released November 1, 2022):
-
Version 3.26.0 (released October 3, 2022):
- Runs under Java 18.
- Renamed all
annotator*
packages to
org.checkerframework.afu.annotator*
, and
renamed all scenelib*
packages to
org.checkerframework.afu.scenelib*
.
- Code is now formatted with Spotless; use
./gradlew spotlessCheck
or
./gradlew spotlessCheck
.
-
Version 3.25.0 (released September 1, 2022):
-
Version 3.24.0 (released August 3, 2022):
- Performance improvements.
-
Version 3.23.0 (released July 11, 2022):
-
Version 3.22.2 (released June 14, 2022):
-
Version 3.22.1 (released June 1, 2022):
- Minor bug fixes and improvements.
-
Version 3.22.0 (released May 2, 2022):
- Minor bug fixes and improvements.
-
Version 3.21.4 (released April 1, 2022):
- Minor bug fixes and improvements.
-
Version 3.21.3 (released March 1, 2022):
- Minor bug fixes and improvements.
-
Version 3.21.2 (released February 1, 2022):
- Minor bug fixes and improvements.
-
Version 3.21.1 (released January 7, 2022):
- Minor bug fixes and improvements.
-
Version 3.21.0 (released December 17, 2021):
- Minor bug fixes and improvements.
-
Version 3.20.0 (released December 6, 2021):
- Minor bug fixes and improvements.
-
Version 3.19.0 (released November 1, 2021):
- Added support for JDK 17, dropped support for JDK 16.
-
Version 3.18.1 (released October 4, 2021):
- Minor bug fixes and improvements.
-
Version 3.18.0 (released September 1, 2021):
- Minor bug fixes and improvements.
-
Version 3.17.0 (released August 2, 2021):
- Minor bug fixes and improvements.
-
Version 3.16.0 (released July 13, 2021):
- Added support for JDK 16.
-
Version 3.15.0 (released June 18, 2021):
- Minor bug fixes and improvements.
-
Version 3.14.0 (released June 1, 2021):
- Minor bug fixes and improvements.
-
Version 3.13.0 (released May 3, 2021):
-
Improved handling of implicit default constructors.
-
Version 3.12.0 (released April 1, 2021):
- Minor bug fixes and improvements.
-
Version 3.11.0 (released March 1, 2021):
- Minor bug fixes and improvements.
-
Version 3.10.0 (released February 1, 2021):
- Implementation detail: Uses real ASM rather than ASMX.
-
Version 3.9.17 (released January 13, 2021):
- Minor bug fixes and improvements.
-
Version 3.9.16 (released January 4, 2021):
- Minor bug fixes and improvements.
-
Version 3.9.15 (released December 1, 2020):
-
Better checking of annotation validity. This may require you to pass a classpath.
- Minor bug fixes and improvements.
-
Version 3.9.14 (released November 2, 2020):
- Minor bug fixes and improvements.
-
Version 3.9.13 (released October 1, 2020):
- Minor bug fixes and improvements.
-
Version 3.9.12 (released September 1, 2020):
- Minor bug fixes and improvements.
-
Version 3.9.11 (released August 3, 2020):
- Minor bug fixes and improvements.
-
Version 3.9.10 (released July 1, 2020):
- Minor bug fixes and improvements.
-
Version 3.9.9 (released June 1, 2020):
- Minor bug fixes and improvements.
-
Version 3.9.8 (released May 3, 2020):
- Minor bug fixes and improvements.
-
Version 3.9.7 (released April 1, 2020):
- Minor bug fixes and improvements.
-
Version 3.9.6 (released March 2, 2020):
- Minor bug fixes and improvements.
- Fixed issues
#269.
-
Version 3.9.5 (released February 3, 2020):
- Minor bug fixes and improvements.
-
Version 3.9.4 (released January 3, 2020):
- Minor bug fixes and improvements.
-
Version 3.9.3 (released December 2, 2019):
- Minor bug fixes and improvements.
-
Version 3.9.2 (released November 1, 2019):
- Minor bug fixes and improvements.
-
Version 3.9.1 (released October 1, 2019):
- Minor bug fixes and improvements.
-
Version 3.9.0 (released August 30, 2019):
- Now uses the Java 9 javac API. The manual describes how to
satisfy this dependency, in a way that works on a Java 8 JVM. Running the AFU on
a Java 9+ JVM is also supported.
- Minor bug fixes and improvements.
-
Version 3.8.11 (released August 22, 2019):
- Minor bug fixes and improvements.
-
Version 3.8.10 (released August 1, 2019):
- Minor bug fixes and improvements.
-
Version 3.8.9 (released July 3, 2019):
- Minor bug fixes and improvements.
- Fixed issues
#216 and
#220.
-
Version 3.8.8 (released June 3, 2019):
- Added command-line arguments
-cp
and -classpath
to extract-annotations
.
- Added command-line argument
--verbose
to
extract-annotations
and insert-annotations
.
- Removed command-line argument
-v
from
extract-annotations
; use --version
instead.
insert-annotations-to-source
does a better check
for existing annotations, to avoid inserting a duplicate annotation.
- Fixed issues
#200 and
#201.
-
Version 3.8.7 (released May 1, 2019):
-
Version 3.8.6 (released April 3, 2019):
- Minor bug fixes and improvements.
-
Version 3.8.5 (released March 1, 2019):
- Minor bug fixes and improvements.
-
Version 3.8.4 (released February 3, 2019):
- Fix bug in which imports were not added for annotations on constructor invocations.
- Documentation clarifies that insert-annotations[-to-source] modifies its target.
-
Version 3.8.3 (released December 5, 2018):
- Minor bug fixes and improvements.
-
Version 3.8.2 (released November 4, 2018):
- Minor bug fixes and improvements.
-
Version 3.8.1 (released October 3, 2018):
- Minor bug fixes and improvements.
-
Version 3.8.0 (released August 30, 2018):
- Requires a Java 8 JVM to execute.
annotation-file-utilities.jar
is now a skinny jar.
annotation-file-utilities-all.jar
is a fat jar.
- Implementation detail: ASMX now uses package
org.objectweb.asmx
,
rather than org.objectweb.asm
.
- Fixed issues
#168
and
#174.
-
Version 3.6.55 (released July 2, 2018):
- Minor bug fixes and improvements.
-
Version 3.6.54 (released June 1, 2018):
- Minor bug fixes and improvements.
-
Version 3.6.53 (released May 2, 2018):
- Minor bug fixes and improvements.
-
Version 3.6.52 (released April 2, 2018):
-
Version 3.6.51 (released March 1, 2018):
- Minor bug fixes and improvements.
-
Version 3.6.50 (released February 1, 2018):
- Minor bug fixes and improvements.
-
Version 3.6.49 (released January 2, 2018):
- Minor bug fixes and improvements.
-
Version 3.6.48 (released December 1, 2017):
- Moved scene-lib classes into package
scenelib
(fixes issue
#121).
- Fixed issues
#144
and
#145.
-
Version 3.6.47 (released November 2, 2017):
- Minor bug fixes and improvements.
-
Version 3.6.46 (released September 29, 2017):
-
Version 3.6.45 (released September 5, 2017):
- Minor bug fixes and improvements.
-
Version 3.6.44 (released August 3, 2017):
- Minor bug fixes and improvements.
-
Version 3.6.43 (released July 3, 2017):
- Minor bug fixes and improvements.
-
Version 3.6.42 (released June 1, 2017):
- Minor bug fixes and improvements.
-
Version 3.6.41 (released May 1, 2017):
- Minor bug fixes and improvements.
-
Version 3.6.40 (released April 3, 2017):
- Minor bug fixes and improvements.
-
Version 3.6.39 (released March 1, 2017):
- Minor bug fixes and improvements.
-
Version 3.6.38 (released Jan 20, 2017):
-
Version 3.6.37 (released Jan 3, 2017):
- Minor bug fixes and improvements.
-
Version 3.6.36 (released Dec 1, 2016):
- Minor bug fixes and improvements.
-
Version 3.6.35 (released Nov 2, 2016):
- Minor bug fixes and improvements.
-
Version 3.6.34 (released Oct 3, 2016):
- Minor bug fixes and improvements.
-
Version 3.6.33 (released Sep 16, 2016):
- Minor bug fixes and improvements.
-
Version 3.6.32 (released Sep 1, 2016):
- Minor bug fixes and improvements.
-
Version 3.6.31 (released August 1, 2016):
- Minor bug fixes and improvements.
-
Version 3.6.30 (released July 1, 2016):
- Minor bug fixes and improvements.
-
Version 3.6.29 (released Jun 1, 2016):
-
extract-annotations no longer puts package annotations on non-existent class,
fixing issue #117.
-
Closes issue #120.
Version 3.6.28 (released May 1, 2016):
-
AScene
now has a copy constructor and implements
Cloneable
.
-
Version 3.6.27 (released Apr 1, 2016):
-
The annotation file format permits use of a class name, in addition to
<init>
, to specify a constructor.
-
Closes issues
#70
and
#88.
-
Version 3.6.26 (released Mar 1, 2016):
- Avoids reinserting an annotation that already exists in comments, fixing Issue
#114.
-
Version 3.6.25 (released Feb 1, 2016):
- Uses system javac to compile the executable program, thus enabling Java 7 execution.
- Clears set of required imports after processing each source file, fixing Issue
#111.
- Escapes String fields of annotations, fixing Issue
#112.
-
Version 3.6.24 (released Jan 4, 2016):
- Fixes Issue
#108
by adding a
LICENSE.txt
file.
- Fixes offset calculation for wide JVM instructions.
- Makes minor improvements to build process.
-
Version 3.6.23 (released Dec 1, 2015):
- Fixes Issue
#106.
- Makes minor improvements to documentation and build process.
-
Version 3.6.22 (released Nov 9, 2015):
- Minor bug fixes and improvements.
-
Version 3.6.21 (released Oct 24, 2015):
- Minor bug fixes and improvements.
-
Version 3.6.20 (released Oct 8, 2015):
- Minor bug fixes and improvements.
-
Version 3.6.19 (released Sep 1, 2015):
- Avoids importing the same annotation name from multiple packages (Issue
#101).
- Fixes some bugs (including Issues
#100 and
#102)
pertaining to
extends
clause generation.
-
Version 3.6.18 (released Aug 4, 2015):
-
Version 3.6.17 (released July 1, 2015):
-
Minor bug fixes and improvements.
-
Version 3.6.16 (released June 1, 2015):
-
Fixes multiple crash-causing bugs in
insert-annotations-to-source
.
-
Version 3.6.15 (released May 1, 2015):
-
Allows annotations on constituents of an intersection type cast without the use of the AST path format.
-
Fixes assorted bugs in
insert-annotations
.
-
Version 3.6.14 (released April 17, 2015):
-
Fixes numerous minor bugs in
insert-annotations
and insert-annotations-to-source
.
-
Version 3.6.13 (released March 2, 2015):
-
Extends support for lambda expressions, member references, and type arguments of static method calls and member references to
extract-annotations
and insert-annotations
.
-
Slightly changes JAIF format for the new features. (See file format documentation for details.)
-
Version 3.6.12 (released January 30, 2015):
-
Adds support for lambda expressions, member references, and type arguments of static method calls and member references to
insert-annotations-to-source
.
-
Version 3.6.11 (released December 19, 2014):
-
Fixes more insertion logic bugs, including errors in handling generic arrays.
-
Version 3.6.10 (released November 26, 2014):
-
Fixes many bugs, mostly in AST path-based insertion logic.
-
Version 3.6.9 (released October 30, 2014):
-
Minor bug fixes and improvements.
-
Version 3.6.8 (released September 24, 2014):
-
Fixes numerous bugs in AST path-based insertion logic.
-
Version 3.6.7 (released August 1, 2014):
-
Improves Java 9 support.
-
Fills in some previously missing cases for AST path-based insertion specifications.
-
Version 3.6.6 (released July 1, 2014):
-
Fixes bug affecting inner array types of new[] expressions in the AST path-based insertion logic.
-
Fixes JAIF generation bugs involving insert-annotation and insert typecast within methods and fields.
-
Version 3.6.5 (released June 2, 2014):
-
Generates extends bounds when necessary for annotation insertion.
-
Fixes assorted bugs in the AST path-based insertion logic.
-
Version 3.6.4 (released May 1, 2014):
-
Expands AST path support to cover every AST node within a class declaration.
-
Abbreviates enum tags for annotations if
--abbreviate
is selected.
-
Generates explicit default constructors when necessary for annotation insertion.
-
Version 3.6.3 (released Apr 2, 2014):
-
Eliminates insert-annotation problems with handling Java 8 class files.
-
Corrects annotation placement within a qualified type name.
-
Fills in gaps in AST Path API. All (Java 7) non-declaration nodes can now be identified by a path from an enclosing declaration.
-
Expands scene-lib API with visitor framework and new class
APIIndex
, which provides a cache that maps Java abstract syntax tree nodes to AST paths as defined in the annotation file format specification.
-
Version 3.6.2 (released Mar 5, 2014):
-
Expands scene-lib API with visitor framework and new class
APIIndex
, which provides a cache that maps Java abstract syntax tree nodes to AST paths as defined in the annotation file format specification.
-
Version 3.6.1 (released Feb 19, 2014):
-
Adds missing cases for AST path-based annotation/cast insertion.
-
Version 3.5.9 (released Jan 2, 2014):
-
Fixes assorted minor bugs.
-
Version 3.5.8 (released Dec 9, 2013):
-
Creates output directory in current working directory (by default), rather than relative to input pathname.
-
Recognizes "instanceinit" keyword in JAIF for adding annotations inside instance initializers.
-
Corrects syntax of results of inserting annotations on bare array literals.
-
More fully treats enum, interface, and annotation declarations in accordance with the rules for class declarations.
-
Version 3.5.7 (released Nov 15, 2013):
-
Handles type paths with INNER_TYPE.
-
Disallows annotations on generic array type bounds and on wildcard bounds in "instanceof" expressions, since Java 8 prohibits type bounds in those locations.
-
Vastly improves performance when index file covers numerous source files, by filtering out irrelevant insertions at an earlier stage.
-
Avoids stack overflow during regex matching.
-
Version 3.5.6 (released Oct 23, 2013):
-
Adds "insert-annotation" to JAIF format, allowing the use of AST paths to specify source locations for annotation insertion (which previously was possible only for typecast insertions).
-
For consistency with
extract-annotations
, insert-annotations-to-source
now matches generic method types in the source with JAIF specifications for their least upper bounds.
-
Allows annotations on inner type declarations of parameterized types.
-
Avoids spurious code location matches on anonymous inner subclasses of an outer class.
-
Works around Java regex bug that on some input causes an infinite loop in the Matcher.
-
Fixes many other bugs, most involving receiver insertions.
-
No longer aborts on (non-fatal) warnings found during the
javac
type-checking phase of insert-annotations-to-source
.
-
Version 3.5.5 (released Aug 28, 2013):
-
Allows annotation insertion at constructor "return type" as per the specification.
-
Fixes assorted bugs dealing with type qualification, inner classes, and receiver insertion.
-
Version 3.5.4 (released Aug 1, 2013):
-
Allow the use of command-line argument files. Argument file rules are identical to those of javac.
-
The Annotation File Utilities now appropriately handles vararg parameters.
-
Minor documentation improvements.
-
Version 3.5.3 (released May 1, 2013):
-
Don't depend on bootstrap javac files.
-
Other minor improvements.
-
Version 3.5.2 (released April 4, 2013):
-
Allow annotations on compound types of a cast insertion.
-
Added
--print_error_stack
command-line option to
insert-annotations-to-source
tool to print a stack trace on
an error.
-
Various bug fixes.
-
Improvements to the Annotation File Format manual.
-
Clarified "Grammar" section by reordering and adding more details.
-
Added "Design and Implementation Details" section.
-
Version 3.5.1 (released March 1, 2013):
-
Small improvements to error messages when parsing JAIF files and for
illegal source code insertions.
-
Installation instruction and manual improvements.
-
Better handling of source code insertions in anonymous and local
classes.
-
Allow source code insertions in a local class (a class defined
within a method).
-
Bug fixes for anonymous and local class indexes.
-
Don't traverse into nested classes when calculating a source code
index.
-
Improved support for source code method declaration receiver parameter
insertions.
-
Use the full type name (Outer.Inner1.Inner2) for receiver insertions
in inner classes.
-
Allow annotation insertions on compound types of method declaration
receiver parameters.
-
Insert source code annotations in the semantically correct place for
qualified types.
-
For bytecode annotation extraction and insertion read and put "local"
type annotations in the Code attribute, not the Method attribute.
-
Version 3.5 (released February 1, 2013):
-
Updated to JSR308 bytecode representation and receiver parameter syntax.
-
Support source code insertion of annotated casts.
-
Support adding annotations to bytecode for type casts with intersection
types.
-
Version 3.4 (released September 11, 2012):
-
Adapted to underlying changes in JSR 308.
-
Support .class literals as annotation attributes.
-
Version 3.3 (released September 20, 2011):
-
Improved support for annotations on array creation expressions.
-
Small tweaks to the code and documentation.
-
Version 3.2 (released June 18, 2011):
-
Support source code indexes, in contrast to the bytecode
centric indexes supported so far, which makes it easier for
source code centric tools to emit AFU files.
See Section "Support for source code indexes" in the
manual.
-
Support annotating the bounds of class and method type
parameters and of wildcards, in particular also support
implicit bounds and make them explicit.
Also support adding declaration annotations on type parameters.
-
Better support for anonymous inner classes.
-
Improve handling of already existing annotations, in
particular for generic types.
-
Consistently do matching on methods using the erased signature.
-
Specify annotations on extends and implements clauses.
-
Handle interfaces, enums, etc. like classes.
-
Numerous small bug fixes and improvements.
-
Version 3.1 (released September 18, 2010):
-
Don't duplicate annotations that are in the source already.
-
Add
--omit-annotation
option to omit a given annotation
(example: @ThisMutable
, which is the default and need not be
inserted in source files).
-
Bug fixes related to inner classes, array levels, multiple methods
with same signature but different return type (impossible in Java
code, but can occur in class files), parameter indices.
-
Switch from utilMDE library to
plume-lib.
-
Version 3.0 (released December 21, 2009):
-
Handle meta-annotations.
Previously, the Annotation File Utilities didn't handle meta-annotations
(annotations that are written on an annotation type declaration); in fact,
AFU simply fabricated retention information. Now, meta-annotations are
handled uniformly with other annotations.
-
Distinguish type annotations from declaration annotations.
Previously, AFU assumed that all annotations were type annotations. Now,
this information is looked up from the meta-annotations and is
distinguished in the file format (see below).
-
Read annotations from classfiles.
Previously, AFU created partial information for annotations in an ad hoc
way, and classfile reading did not work. (The focus was on inserting
annotations in class files, not reading annotations from class files.)
Now, classfile reading is operational, and it is often not necessary to
declare annotations in an annotation file. However, if the annotation is
declared in the annotation file, it should be consistent with its
declaration in the class file.
- Changes to annotation file format.
- Indicating meta-annotations
annotation visible @Nullable:
becomes
annotation @Nullable: @Retention(value=RUNTIME)
and if it's a type annotation, it should be
annotation @Nullable: @Retention(value=RUNTIME) @java.lang.annotation.Target(value={TYPE_USE})
- Locations for type and declaration annotations.
If p2.B is a declaration annotation on a method, it is written as before:
method foo(Ljava/util/Set;)V: @p2.B
If p2.B is a type annotation on a method return type, it is written in a
new location:
method foo(Ljava/util/Set;)V:
return: @p2.B
Fields and method parameters are treated similarly, but with
type
marker instead of return
. So if p2.A is a
declaration annotation targeting the field, while p2.B is a type
annotation on the field, the field would be declared as:
field s: @p2.A
type: @p2.B
Furthermore, inner-type:
is permitted only after a keyword
that introduces a type, such as type
, return
, and
receiver
, to prevent confusion (though the file format
becomes slightly more verbose).
- Permit qualified names in several places that only identifiers were
permitted before. This enables use of names that contain periods, such
as inner classes, and also fully-qualified names.
- Permit two shorthands in annotation uses, as in Java. If there is a
single field named "value", then its name may be omitted: @A(1) instead
of @A(value=1). If an array has only one element, the braces may be
omitted: @B(value=1) instead of @B(value={1}). Both
shorthands may be combined: @B(1) instead of @B(value={1}).
-
Version 2.3.3 (released August 18, 2009):
-
Version 2.3.2 (released August 14, 2009):
- Relax file format: receiver may precede parameters (in spec &
implementation), parameters may omit "#" (in implementation only)
-
Version 2.3.1 (released August 12, 2009):
-
Version 2.3 (released July 29, 2009):
- Support
-i --in-place
argument.
- Fix incorrect array brackets in tests.
- Fix inserting annotations on receivers.
- Improve documentation.
- Improve error handling.
-
Version 2.2 (released December 7, 2008):
- Permit Main to process multiple files at a time.
- Don't re-insert annotations that are already present.
- Add a space before annotation if there isn't one there.
- Fix problems with array syntax; now adheres to the current JSR
308 syntax.
- Improve error handling.
- Code reorganization: remove subdirectories and classes that
added complexity without commensurate functionality.
-
Version 2.1.2 (released April 28, 2008):
Minor updates to the “Annotation File Format Specification” (PDF, HTML).
-
Version 2.1.1 (released May 31, 2007):
Added support for two new annotation target_types; consult the
classfile specification (PDF,
HTML).
-
Version 2.1 (released May 4, 2007):
Modified overall setup of distribution to be easier to understand.
-
Version 2.0 (released May 1, 2007):
Initial public release.
-
Version 1.0 (released March 19, 2007):
Preliminary release.
The
insert-to-annotations-source
tool only
operates on class, field and method signatures.
The original developer (through version 2.1.2) was Jaime Quinonez.