RFR: 8356632: Fix remaining {@link/@linkplain} tags with refer to private/protected types in java.base [v2]

Weijun Wang weijun at openjdk.org
Fri May 23 14:31:52 UTC 2025


On Thu, 22 May 2025 15:18:43 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:

>> Please review this patch to fix some `javadoc` bugs in `java.base`.
>> Certain `@link` tags used to refer to private fields instead of public APIs.
>> 
>> A couple of `@see` tags in the [serialization page](https://download.java.net/java/early_access/jdk25/docs/api/serialized-form.html#java.lang.invoke.MethodType) referred to private methods, I updated the javadoc in a way to not change the way it is displayed to users but also remove `@link` tags to non-included types.
>> 
>> TIA
>
> Nizar Benalla has updated the pull request incrementally with one additional commit since the last revision:
> 
>   revert changes to MethodType.java. <code>foo</code> markup should not be used

src/java.base/share/classes/javax/crypto/KEM.java line 711:

> 709:      * with the key encapsulation message so that the receiver is able to create
> 710:      * a matching decapsulator, it will be included as a byte array in the
> 711:      * {@link Encapsulated#params()} field inside the encapsulation output.

Good catch. The text must have been added before we changed `Encapsulated` from a record to a normal class. Now that `params` is a method instead of a record field, please consider rewriting the sentence to something like

it will be included as a byte array returned by the
{@link Encapsulated#params()} method within the
encapsulation output.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25287#discussion_r2104718909


More information about the core-libs-dev mailing list