OpenJDK 11: Merging in java.lang.Integer (sun.misc.VM -> jdk.internal.misc.VM)
This is part of merging upstream changes from OpenJDK 11.28. This CL
switches to use jdk.internal.VM instead of sun.misc.VM.
Bug: 207841289
Test: treehugger
Change-Id: I273cfac34a26f8cec363f8d7968f33cc123fe0ff
diff --git a/ojluni/src/main/java/java/lang/Integer.java b/ojluni/src/main/java/java/lang/Integer.java
index 12f1b81..3df8c28 100644
--- a/ojluni/src/main/java/java/lang/Integer.java
+++ b/ojluni/src/main/java/java/lang/Integer.java
@@ -29,6 +29,7 @@
import java.lang.annotation.Native;
import java.util.Objects;
import jdk.internal.HotSpotIntrinsicCandidate;
+import jdk.internal.misc.VM;
/**
* The {@code Integer} class wraps a value of the primitive type
@@ -1085,7 +1086,7 @@
* may be controlled by the {@code -XX:AutoBoxCacheMax=<size>} option.
* During VM initialization, java.lang.Integer.IntegerCache.high property
* may be set and saved in the private system properties in the
- * sun.misc.VM class.
+ * jdk.internal.misc.VM class.
*/
private static class IntegerCache {
@@ -1097,7 +1098,7 @@
// high value may be configured by property
int h = 127;
String integerCacheHighPropValue =
- sun.misc.VM.getSavedProperty("java.lang.Integer.IntegerCache.high");
+ VM.getSavedProperty("java.lang.Integer.IntegerCache.high");
if (integerCacheHighPropValue != null) {
try {
int i = parseInt(integerCacheHighPropValue);