RFR: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs [v2]
Justin Lu
duke at openjdk.org
Tue Jan 10 18:42:49 UTC 2023
On Tue, 10 Jan 2023 18:07:54 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> Given that type conversions create the primitive wrapper instances when they are needed, I think the examples should be reconsidered. They needlessly suggest that the wrapper instances need to be explicitly created.
Hi Roger, thanks for the comment,
When I was deciding between autoboxing and using the valueOf() methods, I personally saw the latter as providing more clarity from a documentation standpoint but I understand your concerns. Curious what others think on the decision of using one vs the other.
-------------
PR: https://git.openjdk.org/jdk/pull/11912
More information about the core-libs-dev
mailing list