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

ExE Boss duke at openjdk.org
Mon May 19 16:08:04 UTC 2025


On Sun, 18 May 2025 02:17:46 GMT, Chen Liang <liach 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
>
> src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 4893:
> 
>> 4891:      * @return a constant method handle of the given type, which returns a default value of the given return type
>> 4892:      * @throws NullPointerException if the argument is null
>> 4893:      * @see <code>primitiveZero(Wrapper)</code>
> 
> Just `#zero(Class)` should be sufficient. This is probably changed by intellij during my original work to consolidate zero and constant.

From <https://github.com/openjdk/jdk/pull/23706#discussion_r2094138280>:
Suggestion:

     * @see MethodHandles#zero

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

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


More information about the core-libs-dev mailing list