JDK-8317544 : Consider disabling the compiler's default active annotation processing
  • Type: CSR
  • Component: tools
  • Sub-Component: javac
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 22
  • Submitted: 2023-10-04
  • Updated: 2023-10-06
  • Resolved: 2023-10-06
Related Reports
CSR :  
Description
Summary
-------

Stop running annotation processors found on the class path by default. That behavior can still be enabled by using one or more separate options.

Problem
-------

Starting in JDK 21, the message printed by JDK-8310061 is:

    Annotation processing is enabled because one or more processors were found
    on the class path. A future release of javac may disable annotation processing
    unless at least one processor is specified by name (-processor), or a search
    path is specified (--processor-path, --processor-module-path), or annotation
    processing is enabled explicitly (-proc:only, -proc:full).
    Use -Xlint:-options to suppress this message.
    Use -proc:none to disable annotation processing.

This CSR is to implement the future disabling described in the message above.

Solution
--------

Without other configuration options, do not search the class path for annotation processors.

Specification
-------------
No specification changes.


Comments
Moving to Approved.
06-10-2023

> Use -Xlint:-options to suppress this message. Suggest: Use any annotation processing options or `-Xlint:-options to suppress this message.
06-10-2023