简体   繁体   中英

@NonNullByDefault project-wide setting

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM