We have released a new version of the Type Annotations (JSR 308) compiler,
the Checker Framework, and the Eclipse plugin for the Checker Framework.
* The Type Annotations compiler supports the type annotation syntax that is
planned for a future version of the Java language.
* The Checker Framework lets you create and/or run pluggable type-checkers,
in order to detect and prevent bugs in your code.
* The Eclipse plugin makes it more convenient to run the Checker Framework.
You can find documentation and download links for these projects at:
Notable changes include:
Changes for the Checker Framework
External tool support:
Eclipse plug-in now works properly, due to many fixes
Regex Checker:
New CheckedPatternSyntaxException added to RegexUtil
Support new foreign annotations:
org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.annotation.NonNull
New FAQ: "What is a receiver?"
Make annotations use 1-based numbering for formal parameters:
Previously, due to a bug the annotations used 0-based numbering.
This change means that you need to rewrite annotations in the following ways:
@KeyFor("#3") => @KeyFor("#4")
@AssertNonNullIfTrue("#0") => @AssertNonNullIfTrue("#1")
@AssertNonNullIfTrue({"#0", "#1"}) => @AssertNonNullIfTrue({"#1", "#2"})
@AssertNonNullAfter("get(#2)") => @AssertNonNullAfter("get(#3)")
This command:
find . -type f -print | xargs perl -pi -e 's/("#)([0-9])(")/$1.($2+1).$3/eg'
handles the first two cases, which account for most uses. You would need
to handle any annotations like the last two cases in a different way,
such as by running
grep -r -n -E '\("[^"]+#[0-9][^A-Za-z]|\("#[0-9][^"]' .
and making manual changes to the matching lines. (It is possible to
provide a command that handles all cases, but it would be more likely to
make undesired changes.)
Whenever making automated changes, it is wise to save a copy of your
codebase, then compare it to the modified version so you can undo any
undesired changes. Also, avoid running the automated command over version
control files such as your .hg, .git, .svn, or CVS directory.
There were NO Significant Changes for the Type Annotations Compiler