On Thu, 26 Mar 2026 02:04:12 GMT, Yasumasa Suenaga <[email protected]> wrote:
> In #30392, we found out HexFormat is marked as value based class in Javadoc,
> but they do not have `@ValueBased`.
>
>
> * <p>
> * This is a <a
> href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
> * class; use of identity-sensitive operations (including reference equality
> * ({@code ==}), identity hash code, or synchronization) on instances of
> * {@code HexFormat} may have unpredictable results and should be avoided.
> * The {@code equals} method should be used for comparisons.
> * <p>
> * This class is immutable and thread-safe.
> * <p>
> * Unless otherwise noted, passing a null argument to any method will cause a
> * {@link java.lang.NullPointerException NullPointerException} to be thrown.
> *
> * @since 17
> */
>
>
> public final class HexFormat {
This pull request has now been integrated.
Changeset: 29945240
Author: Yasumasa Suenaga <[email protected]>
URL:
https://git.openjdk.org/jdk/commit/299452402551d5387eb41ad799ce6a05c05237b9
Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod
8380956: HexFormat shoud have @ValueBased
Reviewed-by: rriggs, stuefe, liach
-------------
PR: https://git.openjdk.org/jdk/pull/30444