Release 1.0.3 of the Checker Framework and Type Annotations compiler

3 views
Skip to first unread message

Michael Ernst

unread,
Dec 6, 2009, 12:38:44 AM12/6/09
to jsr308-discuss
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: changed classfile representation for annotations
that are both a type annotation and a declaration annotation; documented
behavior for annotations on type parameter declarations; and the usual
collection of minor improvements and bug fixes. The changelog entries
appear below.

-Mike


Changes for Checker Framework version 1.0.3, 5 Dec 2009:

Checkers
New location UPPER_BOUND for DefaultQualifier permits setting the default
for upper bounds, such as Object in "? extends Object".
@DefaultQualifier accepts simple names, like @DefaultQualifier("Nullable"),
rather than requiring @DefaultQualifier("checkers.nullness.quals.Nullable").
Local variable type inference has improved support for array accesses.
The repository contains Eclipse project and launch configuration files.
This is helpful too people who want to build a checker, not to people
who merely want to run a checker.
Many bug fixes, including:
handling wildcard subtyping rules
stub files and vararg methods being ignored
nullness and spurious rawness errors
uses of array clone method (e.g. String[].clone())
multibound type parameters (e.g. <T extends @A Number & @B Cloneable>)

Manual
Documented the behavior of annotations on type parameter declarations.
New FAQ item:
How to collect warnings from multiple files
Why a qualifier shouldn't apply to both types and declarations


Changes for Type Annotations Compiler version 1.0.3, 5 Dec 2009:

Classfile format
Change classfile representation of annotations that are both a type
annotation and a declaration annotation (e.g., with missing Target
meta-annotation). These are now emitted to the classfile twice.

Base build
Updated to OpenJDK langtools build b77
Message has been deleted

Adam Warski

unread,
Dec 9, 2009, 5:17:36 PM12/9/09
to jsr308-...@googlegroups.com
Guess you forgot to mention, but there's an updated 1.0.3a release available also.

Adam

On Dec 6, 2009, at 6:58 AM, Mahmood Ali wrote:

> Great! Thanks for doing this. Hopefully it didn't trouble you too much.
>
> - Mahmood

Michael Ernst

unread,
Dec 9, 2009, 6:23:50 PM12/9/09
to jsr308-...@googlegroups.com, ad...@warski.org
Adam-

> Guess you forgot to mention, but there's an updated 1.0.3a release
> available also.

Yes, Mahmood made that release a day later. It has no new features, but
does fix two problems that were quite quickly reported against 1.0.3.
1.0.3a seems to be working for everyone.

-Mike

Adam Warski

unread,
Dec 10, 2009, 3:23:39 AM12/10/09
to jsr308-...@googlegroups.com
Yeah, I checked and it all seems to work fine. So a declaration:

class Gen2</*@Nullable*/ E> {
public void add(E e) { }
}

means that the type parameter must be annotated with @Nullable, while:

class Gen1<E extends /*@Nullable*/ Object> {
public void add(E e) { }
}

means that the type parameter can be annotated both with @NotNull and @Nullable.
So it works how a user would expect it to (at least when the user is me :) ).

I wonder if this also fixed Piotr's problems? He seemed to have to most complicated use-cases.

Anyway, thanks for the fixes :).

Adam
Reply all
Reply to author
Forward
0 new messages