diff --git a/src/java.base/share/classes/java/lang/ProcessHandleImpl.java b/src/java.base/share/classes/java/lang/ProcessHandleImpl.java index 81397e24959..1ee6b6bbc76 100644 --- a/src/java.base/share/classes/java/lang/ProcessHandleImpl.java +++ b/src/java.base/share/classes/java/lang/ProcessHandleImpl.java @@ -48,7 +48,7 @@ import java.util.stream.Stream; * @since 9 */ @jdk.internal.ValueBased -final class ProcessHandleImpl implements ProcessHandle { +final primitive class ProcessHandleImpl.val implements ProcessHandle { /** * Default size of stack for reaper processes. */ diff --git a/src/java.base/share/classes/java/lang/Runtime.java b/src/java.base/share/classes/java/lang/Runtime.java index ba6e82af703..029d1530b20 100644 --- a/src/java.base/share/classes/java/lang/Runtime.java +++ b/src/java.base/share/classes/java/lang/Runtime.java @@ -958,7 +958,7 @@ public class Runtime { * @since 9 */ @jdk.internal.ValueBased - public static final class Version + public static final primitive class Version.val implements Comparable { private final List version; diff --git a/src/java.base/share/classes/java/util/ImmutableCollections.java b/src/java.base/share/classes/java/util/ImmutableCollections.java index 52a83552f14..0994e9c6a32 100644 --- a/src/java.base/share/classes/java/util/ImmutableCollections.java +++ b/src/java.base/share/classes/java/util/ImmutableCollections.java @@ -543,7 +543,7 @@ class ImmutableCollections { } @jdk.internal.ValueBased - static final class List12 extends AbstractImmutableList + static final primitive class List12.val extends AbstractImmutableList implements Serializable { @Stable @@ -650,7 +650,7 @@ class ImmutableCollections { } @jdk.internal.ValueBased - static final class ListN extends AbstractImmutableList + static final primitive class ListN.val extends AbstractImmutableList implements Serializable { @Stable @@ -770,7 +770,7 @@ class ImmutableCollections { } @jdk.internal.ValueBased - static final class Set12 extends AbstractImmutableSet + static final primitive class Set12.val extends AbstractImmutableSet implements Serializable { @Stable @@ -896,7 +896,7 @@ class ImmutableCollections { * @param the element type */ @jdk.internal.ValueBased - static final class SetN extends AbstractImmutableSet + static final primitive class SetN.val extends AbstractImmutableSet implements Serializable { @Stable @@ -1107,7 +1107,7 @@ class ImmutableCollections { @Override public Set> entrySet() { - return Set.of(new KeyValueHolder<>(k0, v0)); + return Set.of(new KeyValueHolder(k0, v0)); } @Override diff --git a/src/java.base/share/classes/java/util/KeyValueHolder.java b/src/java.base/share/classes/java/util/KeyValueHolder.java index 9dbce9585e7..a7805fb8469 100644 --- a/src/java.base/share/classes/java/util/KeyValueHolder.java +++ b/src/java.base/share/classes/java/util/KeyValueHolder.java @@ -51,7 +51,7 @@ import jdk.internal.vm.annotation.Stable; * @since 9 */ @jdk.internal.ValueBased -final class KeyValueHolder implements Map.Entry { +final primitive class KeyValueHolder.val implements Map.Entry { @Stable final K key; @Stable diff --git a/src/java.base/share/classes/java/util/Optional.java b/src/java.base/share/classes/java/util/Optional.java index 64647ee49d5..74bb6ce5e0a 100644 --- a/src/java.base/share/classes/java/util/Optional.java +++ b/src/java.base/share/classes/java/util/Optional.java @@ -59,7 +59,7 @@ import java.util.stream.Stream; * @since 1.8 */ @jdk.internal.ValueBased -public final class Optional { +public final primitive class Optional.val { /** * Common instance for {@code empty()}. */ diff --git a/src/java.base/share/classes/java/util/OptionalDouble.java b/src/java.base/share/classes/java/util/OptionalDouble.java index 61e54cfec29..9fad29e96e1 100644 --- a/src/java.base/share/classes/java/util/OptionalDouble.java +++ b/src/java.base/share/classes/java/util/OptionalDouble.java @@ -56,11 +56,11 @@ import java.util.stream.DoubleStream; * @since 1.8 */ @jdk.internal.ValueBased -public final class OptionalDouble { +public final primitive class OptionalDouble.val { /** * Common instance for {@code empty()}. */ - private static final OptionalDouble EMPTY = new OptionalDouble(); + private static final OptionalDouble.val EMPTY = new OptionalDouble(); /** * If true then the value is present, otherwise indicates no value is present diff --git a/src/java.base/share/classes/java/util/OptionalInt.java b/src/java.base/share/classes/java/util/OptionalInt.java index d693a3ddba2..eee5c5c0dc8 100644 --- a/src/java.base/share/classes/java/util/OptionalInt.java +++ b/src/java.base/share/classes/java/util/OptionalInt.java @@ -56,11 +56,11 @@ import java.util.stream.IntStream; * @since 1.8 */ @jdk.internal.ValueBased -public final class OptionalInt { +public final primitive class OptionalInt.val { /** * Common instance for {@code empty()}. */ - private static final OptionalInt EMPTY = new OptionalInt(); + private static final OptionalInt.val EMPTY = new OptionalInt(); /** * If true then the value is present, otherwise indicates no value is present diff --git a/src/java.base/share/classes/java/util/OptionalLong.java b/src/java.base/share/classes/java/util/OptionalLong.java index f92c5bdff17..4359fc11998 100644 --- a/src/java.base/share/classes/java/util/OptionalLong.java +++ b/src/java.base/share/classes/java/util/OptionalLong.java @@ -56,11 +56,11 @@ import java.util.stream.LongStream; * @since 1.8 */ @jdk.internal.ValueBased -public final class OptionalLong { +public final primitive class OptionalLong.val { /** * Common instance for {@code empty()}. */ - private static final OptionalLong EMPTY = new OptionalLong(); + private static final OptionalLong.val EMPTY = new OptionalLong(); /** * If true then the value is present, otherwise indicates no value is present