On Sat, 17 May 2025 19:42:39 GMT, Nizar Benalla <nbena...@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. 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? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25287#discussion_r2094316583 PR Review Comment: https://git.openjdk.org/jdk/pull/25287#discussion_r2094316628