src/java.base/share/classes/java/lang/Integer.java

Print this page

        

*** 24,33 **** --- 24,35 ---- */ package java.lang; import java.lang.annotation.Native; + import java.lang.invoke.Constable; + import java.lang.invoke.MethodHandles; import java.util.Objects; import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.misc.VM; import static java.lang.String.COMPACT_STRINGS;
*** 54,64 **** * @author Arthur van Hoff * @author Josh Bloch * @author Joseph D. Darcy * @since 1.0 */ ! public final class Integer extends Number implements Comparable<Integer> { /** * A constant holding the minimum value an {@code int} can * have, -2<sup>31</sup>. */ @Native public static final int MIN_VALUE = 0x80000000; --- 56,66 ---- * @author Arthur van Hoff * @author Josh Bloch * @author Joseph D. Darcy * @since 1.0 */ ! public final class Integer extends Number implements Comparable<Integer>, Constable<Integer> { /** * A constant holding the minimum value an {@code int} can * have, -2<sup>31</sup>. */ @Native public static final int MIN_VALUE = 0x80000000;
*** 1864,1871 **** --- 1866,1878 ---- */ public static int min(int a, int b) { return Math.min(a, b); } + @Override + public Integer resolveConstant(MethodHandles.Lookup lookup) { + return this; + } + /** use serialVersionUID from JDK 1.0.2 for interoperability */ @Native private static final long serialVersionUID = 1360826667806852920L; }