Jsr-305 annotation replaces Java 9

So far, we have been using findbugs jsr-305 annotation (COM. Google. Code. Findbugs: jsr305), and everything including tool support (sonar, eclipse, findbugs,...) is working normally

However, our understanding is that the jigsaw puzzle in Java 9 will break the jsr-305 annotation (it is not allowed to use one package in two modules) This was confirmed on JavaOne 2015 Oracle's reasoning is that JSR - 305 has never happened and JSR - 250 will have to accept these comments

We are looking for alternatives to JSR - 305 annotations for Java 8 and Java 9 If the history is any guide, the time between Java 9 GA and Java 8 will be very short, and we hope to solve any incompatibility between us and provide code in advance Theoretically, we can upgrade the annotation module of JDK, but it's like a lot of work in our tool chain

Solution

Indeed, two modules usually cannot define the same type

This is partly due to the widespread use of jsr305 Jar, but also makes it easier for existing application servers to migrate to JDK 9. We recently changed the default root module to exclude its annotation module Set jsr305 Jar is placed on JDK 9, and the classpath is now available out of the box Details can be found in jep261

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
分享
二维码
< <上一篇
下一篇>>