[Checkers] Checker for JCIP @GuardedBy annotation

Michael Ernst mernst at cs.washington.edu
Fri Jun 12 13:44:58 EDT 2009


Jeremy-

At JavaOne, you asked me whether the Checker Framework's pluggable type
systems could check JCIP's @GuardedBy annotation.  They did not at the
time, but spurred by your encouragement and that of other people at
JavaOne, Mahmood Ali (cc'ed) wrote a checker for the JCIP GuardedBy
annotation, as a type-checker built on the Checker Framework.  (We already
had a checker for an @Immutable annotation that is essentially the same as
the JCIP one.)

Mahmood has checked a couple of projects that already had a few @GuardedBy
annotations.  De found no errors with those particular annotations.  We
will look into additional projects.  The biggest difficulty with such a
case study is knowing what the intended locking semantics is.  If you have
projects where you know that information, we would be happy to try our
checker on your codebase.  Or, we can give you the checker so that you can
try it yourself.

                    -Mike



More information about the checkers mailing list