[ImageJ-devel] JSR-305 Annotations
Lee Kamentsky
leek at broadinstitute.org
Tue Aug 17 07:44:16 CDT 2010
Admittedly, I'm not a day-to-day Java programmer so there's the first
caveat, I may be missing something. Having said that, I can't see much
downside to using the suggested annotations. At worst, the syntax
changes and the effort is somewhat wasted, aside from providing informal
documentation on a method argument's use. At best, these annotations
give valuable information on the intended use of an argument: is Null
expected, what's the concurrency policy for the argument, how secure is
the data in the argument.
I'm assuming that the Java compiler is agnostic about annotations, aside
from being able to capture them unambiguously. If that's the case, I'd
say use them liberally.
--Lee
Grant B. Harris wrote:
> ImageJ'ers --
>
> JSR-305 defines annotations that enable static analysis, compiler checks, and
> other tools to improve safety and robustness. They are expected to be in JDK7.
> Any opinion on whether we might want to adopt the use of any of these as a group
> (perhaps at least in the 'core')?
>
> See:
>
> *The Open Road: /javax/./annotation/*
> <http://java.net/article/2008/09/08/open-road-javaxannotation>
>
> /JSR 305: Annotations for Software Defect Detection in Java/
> <http://code.google.com/p/jsr-305>
>
>
> -- Grant
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagejdev.org
> http://imagejdev.org/mailman/listinfo/imagej-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20100817/afdc66e9/attachment.html>
More information about the ImageJ-devel
mailing list