mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8295555: Primitive wrapper caches could be @Stable
Reviewed-by: rriggs
This commit is contained in:
parent
5d716121c1
commit
f7de726bd3
5 changed files with 16 additions and 5 deletions
|
@ -27,6 +27,7 @@ package java.lang;
|
|||
|
||||
import jdk.internal.misc.CDS;
|
||||
import jdk.internal.vm.annotation.IntrinsicCandidate;
|
||||
import jdk.internal.vm.annotation.Stable;
|
||||
|
||||
import java.lang.constant.Constable;
|
||||
import java.lang.constant.DynamicConstantDesc;
|
||||
|
@ -231,9 +232,10 @@ public final class Short extends Number implements Comparable<Short>, Constable
|
|||
return Optional.of(DynamicConstantDesc.ofNamed(BSM_EXPLICIT_CAST, DEFAULT_NAME, CD_short, intValue()));
|
||||
}
|
||||
|
||||
private static class ShortCache {
|
||||
private static final class ShortCache {
|
||||
private ShortCache() {}
|
||||
|
||||
@Stable
|
||||
static final Short[] cache;
|
||||
static Short[] archivedCache;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue