RFR: 8329718: Incorrect `@since` tags in elements in jdk.compiler and java.compiler [v2]
Nizar Benalla
nbenalla at openjdk.org
Wed May 22 14:05:07 UTC 2024
On Wed, 22 May 2024 14:01:20 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:
>> This PR aims to add `@since` tags in elements in both `jdk.compiler` and `java.compiler`.
>> A lot of these changes have to do with handling of preview features.
>>
>> The existing rules for handling of `@since` for preview elements:
>> - When an element is still marked as preview, the `@since` should be the first JDK release where the element was added.
>> - If the element is no longer marked as preview, the `@since` should be the first JDK release where it was no longer preview.
>>
>> It is tricky to check these, the way preview elements were annotated before the inroduction of `@Previewfeature` in JDK 17:
>> - in jdk 12-13 they were annotated with `@Deprecated(forRemoval=true, since=...)`
>> - in jdk 14-15 they were annotated with `@jdk.internal.preview` or with `{@preview Associated with ....` in the `javadoc` comment
>>
>> If you're reviewing these changes, Thanks!
>
> Nizar Benalla has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>
> - Merge branch 'master' into 8329718
> - small change, `visitYield` went out of preview in JDK 14
> - add `@since` tags to `java.compiler`
> - add `@since` tags to `jdk.compiler`
I did an other pass over these and I made a small change to `visitYield`, it went out of preview in JDK 14, not JDK 15. I hope it's fine.
Here it is[ in preview](https://github.com/openjdk/jdk13/blob/dcd4014cd8a6f49a564cbb95387ad01a80a20bed/src/jdk.compiler/share/classes/com/sun/source/tree/TreeVisitor.java#L573)
Here it is [out of preview](https://github.com/openjdk/jdk14/blob/abc56193174dd6a11a8453bd5036fc8618ecca61/src/jdk.compiler/share/classes/com/sun/source/tree/TreeVisitor.java#L576)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18972#issuecomment-2124879721
More information about the compiler-dev
mailing list