On Tue, 17 Oct 2023 09:35:59 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:

>> Please review a change to add support for restricted methods to JavaDoc. The 
>> bulk of this patch was contributed by @mcimadamore. It adds a warning note 
>> to the summary and details of restricted methods and a superscript to links 
>> to restricted methods, similar to what we already do with elements belonging 
>> to preview APIs. I added a summary page to list all restricted methods as 
>> well as a test.
>> 
>> To see the wording of this feature in context, the relevant parts of 
>> generated documentation can be reviewed here:
>> 
>> - [Method 
>> summary](https://cr.openjdk.org/~hannesw/8316972/api.00/java.base/java/lang/foreign/AddressLayout.html#method-summary)
>> - [Method 
>> details](https://cr.openjdk.org/~hannesw/8316972/api.00/java.base/java/lang/foreign/AddressLayout.html#withTargetLayout(java.lang.foreign.MemoryLayout))
>> - [Restricted Methods 
>> list](https://cr.openjdk.org/~hannesw/8316972/api.00/restricted-list.html)
>> - [Restricted Methods help 
>> section](https://cr.openjdk.org/~hannesw/8316972/api.00/help-doc.html#restricted)
>> 
>> Since the messages for deprecated, preview, and restricted elements all use 
>> the same CSS in our default stylesheet, I decided to combine them into a 
>> single CSS rule. It is still possible to define distinct styles for these 
>> features in user-provided stylesheets.
>
> Hannes Wallnöfer has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Rename local variable

This change seems to result in a wrong `sealed` modifier being added to all 
restricted methods 
([example](https://cr.openjdk.org/~hannesw/8316972/api.00/java.base/java/lang/foreign/AddressLayout.html#withTargetLayout(java.lang.foreign.MemoryLayout)),
 wasn't there in [Java 
21](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/foreign/AddressLayout.html#withTargetLayout(java.lang.foreign.MemoryLayout))).
 My guess to why this is happening is that `com.sun.tools.javac.code.Flags` has 
the same value for both `SEALED` and `RESTRICTED`.

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

PR Comment: https://git.openjdk.org/jdk/pull/16188#issuecomment-1925960367

Reply via email to