Release 1.1.0 of the Checker Framework and Type Annotations compiler

15 views
Skip to first unread message

Mahmood Ali

unread,
Jun 14, 2010, 10:07:52 AM6/14/10
to jsr308-...@googlegroups.com
We have released a new version of the Type Annotations (JSR 308) compiler
and of the Checker Framework. The Type Annotations compiler supports the
Java 7 annotation syntax. The Checker Framework lets you create and/or run
pluggable type-checkers, in order to detect and prevent bugs in your code.

Notable changes include a new simplified installation method, in addition to
bug fixes. The new distribution includes an platform-independent executable
jar, that can be used in place of javac. To use you can just download and
unzip checker framework zip file and run it as:

java -jar checkers/binary/jsr308-all.jar \
-processor checkers.nullnessChecker Test.java

[You don't need to pass the annotated JDK when using it]

The changelogs appear below
- Mahmood

P.S. Future releases will include the jar as a separate downloadable as well.

Changes for Checker Framework
Version 1.1.0, 13 Jun 2010

Checkers
Introduced a new simple mechanism for running the Checkers
Added one annotated JDK for all checkers

Nullness Checker
Fixed bugs related to map.get() and KeyFor annotation
Fixed bugs related to AssertNonNull* and parameters
Minor updates to the annotated JDK, especially to java.io.File

Manual
Updated installation instructions
Clarified section regarding fields and type inference


Changes for Type Annotations Compiler
Version 1.1.0, 13 Jun 2010

Base build
Updated to OpenJDK langtools build b97

jonnybbb

unread,
Jun 16, 2010, 6:24:19 AM6/16/10
to Type annotations (JSR 308) discussions
I tried to tun the example as explained
java -jar checkers/binary/jsr308-all.jar \
-processor checkers.nullnessChecker Test.java

with JDK 6. But get the following error. Is the example supposed to
work with Java 6?

java.lang.NoSuchFieldError: RELEASE_7
at com.sun.tools.javac.code.Source.toSourceVersion(Source.java:
188)
at com.sun.tools.javac.processing.JavacProcessingEnvironment
$ProcessorSt
cProcessingEnvironment.java:530)
at com.sun.tools.javac.processing.JavacProcessingEnvironment
$ProcessorSt
va:501)
at com.sun.tools.javac.processing.JavacProcessingEnvironment
$DiscoveredP
vacProcessingEnvironment.java:594)
at
com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAnd
:690)
at
com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessin
at
com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler
at
com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:796)
at com.sun.tools.javac.main.Main.compile(Main.java:412)
at com.sun.tools.javac.main.Main.compile(Main.java:330)
at com.sun.tools.javac.main.Main.compile(Main.java:321)
at com.sun.tools.javac.Main.compile(Main.java:82)
at com.sun.tools.javac.Main.main(Main.java:67)
at checkers.util.CheckerMain.main(CheckerMain.java:38)

regards
Johannes

Mahmood Ali

unread,
Jun 16, 2010, 10:33:17 AM6/16/10
to jsr308-...@googlegroups.com
Greetings,

> I tried to tun the example as explained
> java -jar checkers/binary/jsr308-all.jar \
> -processor checkers.nullnessChecker Test.java
>
> with JDK 6. But get the following error. Is the example supposed to
> work with Java 6?

Thanks for reporting the bug. It should work on Java 6 (but I missed one of
my changes!). I made another release 1.1.0b that should be live on the site
any second now.

Also, feel free to download the latest jsr308-all.jar directly from:
http://bit.ly/b5HU0b [1], which always points to the latest binary development
snapshot.

Regards,
Mahmood

[1] Expands to
http://jicama.cs.washington.edu:8080/hudson/job/checker-framework/lastSuccessfulBuild/artifact/checkers/binary/jsr308-all.jar

jonnybbb

unread,
Jun 18, 2010, 6:37:57 AM6/18/10
to Type annotations (JSR 308) discussions
Thanks for the fast fix! It works perfectly fine!
Is it also possible to run the check against a whole source folder?

Regards
Johannes
> [1] Expands tohttp://jicama.cs.washington.edu:8080/hudson/job/checker-framework/las...

Mahmood Ali

unread,
Jun 18, 2010, 9:29:27 AM6/18/10
to jsr308-...@googlegroups.com
Greetings,

> Thanks for the fast fix! It works perfectly fine!

Great!

> Is it also possible to run the check against a whole source folder?

Here the standard javac command line applies, where any command that uses
"javac" can work with "java -jar jsr308-all.jar". So you can do (in *nix):

java -jar jsr308-all.jar -processor ... src/*.java # or
java -jar jsr308-all.jar -processor ... `find src -name '*.java'`

However, at that point, I recommend that you use a build tool, like Ant and
Maven. You can find the instructions for that in the manual [1].

[1] http://types.cs.washington.edu/checker-framework/#external-tools

Regards,
Mahmood

Reply all
Reply to author
Forward
0 new messages