Java – unable to parse org. XML eclipse. jdt. annotation. Nonnull type It is from what is needed Class file indirectly referenced

When I use the Java 8 method to reference the double colon operator (:) and the new operator (for example, mytype:: new), I get this error in eclipse of the spring tool suite (STS):

How to get rid of this mistake?

Solution

Stephan Herrmann provided a description of the error in his comments Opening the eclipse issue is more user - friendly

The solution is to include the following dependencies:

<dependency>
    <groupId>org.eclipse.jdt</groupId>
    <artifactId>org.eclipse.jdt.annotation</artifactId>
    <version>2.0.0</version>
</dependency>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>