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

Joe Darcy darcy at openjdk.org
Mon May 19 20:43:52 UTC 2025


On Mon, 19 May 2025 11:31:23 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/invoke/MethodType.java line 1341:
>> 
>>> 1339:      * @throws ClassNotFoundException if one of the component classes cannot be resolved
>>> 1340:      * @see <code>MethodType.readResolve()</code>
>>> 1341:      * @see <code>MethodType.writeObject(ObjectOutputStream s)</code>
>> 
>> This is already not generated by the javadoc as this method is private. Why is this check against a private method?
>
> They are documented in [this page](https://download.java.net/java/early_access/jdk25/docs/api/serialized-form.html#java.lang.invoke.MethodType)

Okay -- if there is some link to the private serial-related methods even in a public javadoc run, I think it would be preferable if links to those methods could be resolved by javadoc. Otherwise, if the links to private methods _from a private method_, would be valid in a private javadoc run, I thinks more refined version of warning would let those be.

As it is, if the see tags are going to stay, I don't think `<code>foo</code>` markup should be used.

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

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


More information about the core-libs-dev mailing list