The type org.eclipse.jdt.annotation.NonNull cannot be resolved. It is indirectly referenced from required .class files

前端 未结 3 445
广开言路
广开言路 2021-02-01 17:24

When I use the Java 8 method reference double colon operator (::) with new operator (e.g. MyType::new), I get this error in Eclipse of Spring Tool suit

3条回答
  •  清歌不尽
    2021-02-01 17:45

    I have solved it by changing the "Use default annotation for null specifications"

    I have enter the both class names:

    javax.annotation.Nonnull
    javax.annotation.Nullable
    

提交回复
热议问题