mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +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
|
@ -36,6 +36,7 @@ import java.util.Optional;
|
|||
import jdk.internal.misc.CDS;
|
||||
import jdk.internal.vm.annotation.ForceInline;
|
||||
import jdk.internal.vm.annotation.IntrinsicCandidate;
|
||||
import jdk.internal.vm.annotation.Stable;
|
||||
|
||||
import static java.lang.String.COMPACT_STRINGS;
|
||||
import static java.lang.String.LATIN1;
|
||||
|
@ -1156,9 +1157,10 @@ public final class Long extends Number
|
|||
return Long.valueOf(parseLong(s, 10));
|
||||
}
|
||||
|
||||
private static class LongCache {
|
||||
private static final class LongCache {
|
||||
private LongCache() {}
|
||||
|
||||
@Stable
|
||||
static final Long[] cache;
|
||||
static Long[] archivedCache;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue