Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WARNING] Supported source version 'RELEASE_8' from annotation processor 'org.glassfish.corba.annotation.processing.ExceptionWrapperProcessor' less than -source '11' #159

Open
tdferreira opened this issue Mar 23, 2024 · 4 comments

Comments

@tdferreira
Copy link

I'm getting the following error all over my maven build when trying to compile my project with JDK11, where I include glassfish-corba-orb:4.2.5 as a dependency:

[WARNING] Supported source version 'RELEASE_8' from annotation processor 'org.glassfish.corba.annotation.processing.ExceptionWrapperProcessor' less than -source '11'

Do you plan to fully support Java 11?

@arjantijms
Copy link
Contributor

Java 11+ is supported, but that warning is indeed annoying. If I'm not mistaken it's a little bit difficult to get rid of though.

@tdferreira
Copy link
Author

https://github.com/eclipse-ee4j/orb/blob/master/exception-annotation-processor/src/main/java/org/glassfish/corba/annotation/processing/ExceptionWrapperProcessor.java#L37

Does it have a major impact changing @SupportedSourceVersion(SourceVersion.RELEASE_8) to @SupportedSourceVersion(SourceVersion.RELEASE_11)?

@pzygielo
Copy link
Contributor

With current target (8) - SourceVersion.RELEASE_11 is unknown I think.

In next step one could ask Do you plan to fully support Java 17? or Do you plan to fully support Java 21? Using SourceVersion.RELEASE_11 would not prevent the warnings from javac.

But perhaps the comment (for issue resolved as Not an Issue) https://bugs.openjdk.org/browse/JDK-8037955?focusedId=13475725&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13475725 could be of help here. I take the liberty to quote it here:

This request stems from a mis-use of the API. The usage model in question is using the @SupportedSourceVersion annotation together with AbstractProcessor which reads the source version stored in that annotation. This pairing of the @SupportedSourceVersion with AbstractProcessor works well in the common case of a processor supporting a single source value independent of which version of the platform the processor is run on.

If the processor author needs a more nuanced behavior to compute the supported source version, then the getSupportedSourceVersion() method should be overridden to implement the logic in question.

It is possible to return, say, RELEASE_6 when running on JDK 6 and RELEASE_7 when running on JDK 7 without using reflection. Something like

if (SourceVersion.latest > RELEASE_6)
 return (SourceVersion.values())[RELEASE_6.ordinal()+1];
else
 return RELEASE_6

@russgold
Copy link
Contributor

russgold commented Jun 21, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants