Hi all,

while working on fixing compiler warnings in several places I've come along
some warnings the compiler emitted while compiling the sources.

A short example follows:
.../nbbuild/build/public-package-jars/org-netbeans-api-annotations-common.jar(/org/netbeans/api/annotations/common/NonNull.class):
warning: Cannot find annotation method 'when()' in type 'Nonnull': class
file for javax.annotation.Nonnull not found
warning: unknown enum constant When.ALWAYS
  reason: class file for javax.annotation.meta.When not found
.../nbbuild/build/public-package-jars/org-netbeans-api-annotations-common.jar(/org/netbeans/api/annotations/common/NullAllowed.class):
warning: Cannot find annotation method 'when()' in type 'Nonnull'
warning: unknown enum constant When.MAYBE
.../nbbuild/build/public-package-jars/org-netbeans-api-annotations-common.jar(/org/netbeans/api/annotations/common/CheckForNull.class):
warning: Cannot find annotation method 'when()' in type 'Nonnull'
warning: unknown enum constant When.MAYBE
.../nbbuild/build/public-package-jars/org-netbeans-api-annotations-common.jar(/org/netbeans/api/annotations/common/NullUnknown.class):
warning: Cannot find annotation method 'when()' in type 'Nonnull'
warning: unknown enum constant When.UNKNOWN

These warning are annoying in so far as even if I manage to fix all fixable
warnings fixed - either by fixing the code or suppressing the warning when
appropriate - this leaves me with these warnings. This then also prevents
me from setting the -Werror compiler flag - which will ensure that no new
warning will leak into existing code.

My problem is that I don't know how to fix these warnings.

Can somebody help?

Regards
Martin

Reply via email to