Skip to content

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

@lukaseder

Description

@lukaseder

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions