-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
low
-
Some annotation processing users may have missed the message and be surprised by the new behavior. However, it is easily restored by adding the `-proc:full` command line option, which is also valid in JDK 21.
-
add/remove command in $JDK/bin, add/remove/modify command line option
-
JDK
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.
- csr of
-
JDK-8306819 Consider disabling the compiler's default active annotation processing
- Resolved
- relates to
-
JDK-8321319 Reinstate disabling the compiler's default active annotation processing
- Closed
-
JDK-8321321 Defer policy of disabling annotation processing by default
- Closed