This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 152221 [details] Package wise null-check annotations support Patch provides support for the following null-check related package annotations: @ParametersAreNonnullByDefault @ParametersAreNullableByDefault @ReturnValuesAreNonnullByDefault @ReturnTypesAreNonnullByDefault
My first thought was, why not reuse the existing @NonNull and @Nullable. But after giving it some more thought, is this something we should add/use? Why not add the annotations to the element directly? Is there some paper recommending @NonNull and @Nullable on package level?
(In reply to Ralph Ruijs from comment #1) > My first thought was, why not reuse the existing @NonNull and @Nullable. But > after giving it some more thought, is this something we should add/use? Why > not add the annotations to the element directly? Is there some paper > recommending @NonNull and @Nullable on package level? That is the point - element-wise (ie parameter, variable, field) annotations ARE supported since 7.3 or earlier. This patch provides support for package level annotations, so you can define default null policy for package. This is already supported by Ecliple and IDEA. See: http://wiki.eclipse.org/JDT_Core/Null_Analysis http://blog.scottlogic.com/2013/09/09/nullable-in-kepler.html https://www.jetbrains.com/idea/help/-parametersarenonnullbydefault-annotation.html [in russian] http://habrahabr.ru/post/204518/
Will evaluate.