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

Add CompileOptions.warningHandling() to specify how compile time warnings should be handled #122

Open
4 tasks
lukaseder opened this issue Mar 31, 2022 · 1 comment

Comments

@lukaseder
Copy link
Member

Currently, when there are compile time warnings, we're throwing a ReflectException. For example, if an annotation processor declares supporting Java 11, but we're processing things with Java 15, there's this exception here:

org.joor.ReflectException: Compilation error: warning: Supported source version 'RELEASE_11' from annotation processor 'org.joor.test.CompileOptionsTest$AProcessor' less than -source '15'

That shouldn't be an exception, but just a log message. We should have:

  • CompileOptions.warningHandling() as a way to set the warning level
  • WarningHandling.ERROR to treat warnings as errors
  • WarningHandling.LOG to log warnings on System.out
  • WarningHandling.IGNORE to silently ignore warnings
@lukaseder
Copy link
Member Author

Huh I cannot seem to consistently reproduce this warning. May have been some IDE related artifact? Will investigate again, once this can be reproduced more consistently.

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

No branches or pull requests

1 participant