On Thu, 5 Dec 2024 22:26:31 GMT, Chen Liang <li...@openjdk.org> wrote:

>> test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java 
>> line 643:
>> 
>>> 641: 
>>> 642:         Task.Result result = new JavacTask(tb)
>>> 643:                 .processors(new TestAP())
>> 
>> I assume this fix does not require this change, right?  If so, better to 
>> keep the original code and do this cleanup as a separate issue.
>
> It is required.  If we use the command line and FQN to specify a processor 
> like in the current code without preview, this test fails with some classpath 
> error.
> 
>> Weird annotation processor behavior in 
>> test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java
> 
>>Without preview and using explicit file name, the javac task fails; using the 
>>builder live AP object works both with and without preview.
> 
> I should attach the exact error message:
> 
> 
> test: testInnerClass
> [DIRECT]:
> - compiler.err.proc.processor.not.found: ParameterAnnotations$TestAP
> - compiler.err.proc.no.explicit.annotation.processing.requested: T$I
> 2 errors
> Exception running test testInnerClass: toolbox.Task$TaskError: Task javac 
> failed: rc=1
> toolbox.Task$TaskError: Task javac failed: rc=1
>         at toolbox.AbstractTask.checkExit(AbstractTask.java:154)
>         at toolbox.JavacTask.run(JavacTask.java:381)
>         at toolbox.AbstractTask.run(AbstractTask.java:102)
>         at toolbox.JavacTask.run(JavacTask.java:52)
>         at toolbox.JavacTask.run(JavacTask.java:321)
>         at ParameterAnnotations.doTest(ParameterAnnotations.java:650)
>         at ParameterAnnotations.testInnerClass(ParameterAnnotations.java:151)
>         at 
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:565)
>         at toolbox.TestRunner.runTests(TestRunner.java:91)
>         at ParameterAnnotations.runTests(ParameterAnnotations.java:82)
>         at ParameterAnnotations.main(ParameterAnnotations.java:73)
>         at 
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:565)
>         at 
> com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
>         at java.base/java.lang.Thread.run(Thread.java:1447)
> 
> 
> Same for all 5 tests in this file.

Filed https://bugs.openjdk.org/browse/JDK-8345622. There is no similar issues 
that happen as a conjunction of preview and annotation processing.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22420#discussion_r1872252558

Reply via email to