<i18n dev> RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714 [v2]
Mandy Chung
mchung at openjdk.org
Thu Dec 5 22:02:40 UTC 2024
On Thu, 5 Dec 2024 20:44:59 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Remove the redundant `@enablePreview` and `--enable-preview` flags for enabling ClassFile API in the tests. The remainder of these flags in all tests seem to serve preview APIs (such as ScopedValue) or language features (primitive pattern, module imports, etc.), or testing the enable preview flag itself. Now there is fewer than 100 `@enablePreview` in the `test` directory.
>>
>> To reviewers, there are some redundant changes and notes:
>>
>> - There's one security test that used `ModuleInfoWriter` that depends on ClassFile API.
>> - Removed unnecessary exports of `jdk.internal.classfile.impl`. Remaining uses are:
>> - `BoundAttribute::payloadLen` for javac attribute tests
>> - Annotation reading/writing for javac annotation tests
>> - Line number changes to:
>> - test/langtools/tools/javac/linenumbers/NestedLineNumberTest.java
>> - test/langtools/tools/javac/linenumbers/NullCheckLineNumberTest.java
>> - Move from legacy jdk.internal.classfile to java.lang.classfile in:
>> - test/langtools/tools/javac/NoStringToLower.java and
>> - test/langtools/tools/javac/T8003967/DetectMutableStaticFields.java
>> - 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.
>>
>> Testing: tier 1-5. Please inform me if any of these tests belong to higher tiers.
>
> 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
The change looks okay to me except `ParameterAnnotations.java`. This task is part of JEP 484 and test-only. It seems good to backport to 24.
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.
-------------
PR Review: https://git.openjdk.org/jdk/pull/22420#pullrequestreview-2483057967
PR Review Comment: https://git.openjdk.org/jdk/pull/22420#discussion_r1872207964
More information about the i18n-dev
mailing list