[JSR308] A little prototype experience...

Arnout Engelen arnouten at bzzt.net
Fri May 4 20:38:41 EDT 2007


Neal Gafter wrote:
> I was unable to build the @NonNull checker, but I believe null
> checking cannot be done statically in Java, even with user
> annotations. Once I get the checker working I'll demonstrate with a
> small program that throws a NullPointerException on the use of a
> variable whose type was annotated @NonNull.
I'd agree it's probably impossible to write a real-world @NonNull
checker that is both sound and complete.

However, I do think such a checker can be useful, even if it's neither
sound nor complete - just look at existing tools like ESC/Java2 and
FindBugs. And even in the abcense of tools, a programmer might wish to
(`formally') express his design intentions, even if the tooling can't
always check that the code indeed satisfies them.


Arnout



More information about the JSR308 mailing list