Supported source version RELEASE_6 from annotation processor org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor less than source1.7

做~自己de王妃 提交于 2019-11-30 11:39:43

According to the Java API specification, the @SupportedSourceVersion annotation (which is the origin of the log) specifies "the latest source version an annotation processor supports", not the minimum.

Reading a discussion on the NetBeans forum on this topic, it suggests you have few solutions. I guess the only solution is to change the code in CanonicalModelProcessor:

In order for the EclipseLink runtime to be compliant with Java 6, you have @SupportedSourceVersion(RELEASE_6)

To be properly adapted for a Java 7 compilation, you should have @SupportedSourceVersion(RELEASE_7)

But as I understand you are not compiling EclipseLink on your own. The main problem (and the reason of the warning) is that the software provider (i.e. the Eclipse foundation) guarantees a proper processing of the code in a Java SE 6 environment.

The problem was reported as a JDK bug. The conclusion is that there is no other clear workaround.

The solution would be to specify the RELEASE7 constant (at least according to what the API says). But if EclipseLink team do, they can't compile in a Java 6 environment.

So whether you compile EclipseLink on your own with the proper constant, whether you live with the warning...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!