-
Bug
-
Resolution: Fixed
-
P3
-
21
-
b14
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8315670 | 21.0.1 | Jan Lahoda | P3 | Resolved | Fixed | b10 |
Consider code like:
---
com.sun.source.util.JavacTask task =
(com.sun.source.util.JavacTask) provider.getTask(compilerOut, null, null, options, null, inputFile);
Processor processor =
(Processor) processorClass.getDeclaredConstructor().newInstance();
task.setProcessors(List.of(processor));
task.analyze();
---
This will produce warning like:
---
Note: 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.
---
which is incorrect, as the processors where passed in using the API.
---
com.sun.source.util.JavacTask task =
(com.sun.source.util.JavacTask) provider.getTask(compilerOut, null, null, options, null, inputFile);
Processor processor =
(Processor) processorClass.getDeclaredConstructor().newInstance();
task.setProcessors(List.of(processor));
task.analyze();
---
This will produce warning like:
---
Note: 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.
---
which is incorrect, as the processors where passed in using the API.
- backported by
-
JDK-8315670 Incorrect warnings about implicit annotation processing
- Resolved
- relates to
-
JDK-8310061 Note if implicit annotation processing is being used
- Resolved
- links to
-
Commit openjdk/jdk21u/a4d64abf
-
Commit openjdk/jdk/94a74a0a
-
Review openjdk/jdk21u/132
-
Review openjdk/jdk/15540
(1 links to)