<i18n dev> RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714 [v2]
Chen Liang
liach at openjdk.org
Thu Dec 5 22:29:40 UTC 2024
On Thu, 5 Dec 2024 21:54:19 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
>>
>> - Merge branch 'master' of https://github.com/openjdk/jdk into cleanup/cf-preview
>> - 8334733: Remove obsolete @enablePreview from tests after JDK-83324714
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22420#discussion_r1872240998
More information about the i18n-dev
mailing list