Skip to content

Commit

Permalink
8344259: Annotate Float16 with jdk.internal.ValueBased
Browse files Browse the repository at this point in the history
Reviewed-by: liach, darcy
  • Loading branch information
Paul Sandoz committed Nov 15, 2024
1 parent 0b9b82a commit 1866c0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/java.base/share/classes/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@
jdk.compiler;
exports com.sun.security.ntlm to
java.security.sasl;
exports jdk.internal to
jdk.incubator.vector;
// Note: all modules in the exported list participate in preview features
// and therefore if they use preview features they do not need to be
// compiled with "--enable-preview".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@
// Currently Float16 is a value-based class and in future it is
// expected to be aligned with Value Classes and Object as described in
// JEP-401 (https://openjdk.org/jeps/401).
// @jdk.internal.MigratedValueClass
// @jdk.internal.ValueBased
@jdk.internal.ValueBased
public final class Float16
extends Number
implements Comparable<Float16> {
Expand Down Expand Up @@ -323,7 +322,7 @@ public static Float16 valueOf(long value) {
* @param f a {@code float}
*/
public static Float16 valueOf(float f) {
return new Float16(Float.floatToFloat16(f));
return new Float16(floatToFloat16(f));
}

/**
Expand Down

0 comments on commit 1866c0c

Please sign in to comment.