The documentation for the @NonNullByDefault attribute states the following:
“If a @NonNullByDefault annotation is used within the scope of another @NonNullByDefault annotation or a project-wide default setting, the innermost annotation defines the default applicable at any given position”
How do I set a project-wide default setting?
You cannot set a project wide default, the javadoc is incorrect and I opened a bug for it – https://bugs.eclipse.org/bugs/show_bug.cgi?id=385540
You can apply a default to a package via package-info.java file