< prev index next >
jdk/src/java.base/share/classes/java/lang/Integer.java
Print this page
*** 714,724 ****
* @throws NumberFormatException if the {@code CharSequence} does not
* contain a parsable {@code int} in the specified
* {@code radix}, or if {@code radix} is either smaller than
* {@link java.lang.Character#MIN_RADIX} or larger than
* {@link java.lang.Character#MAX_RADIX}.
! * @since 1.9
*/
public static int parseInt(CharSequence s, int beginIndex, int endIndex, int radix)
throws NumberFormatException {
s = Objects.requireNonNull(s);
--- 714,724 ----
* @throws NumberFormatException if the {@code CharSequence} does not
* contain a parsable {@code int} in the specified
* {@code radix}, or if {@code radix} is either smaller than
* {@link java.lang.Character#MIN_RADIX} or larger than
* {@link java.lang.Character#MAX_RADIX}.
! * @since 9
*/
public static int parseInt(CharSequence s, int beginIndex, int endIndex, int radix)
throws NumberFormatException {
s = Objects.requireNonNull(s);
*** 897,907 ****
* @throws NumberFormatException if the {@code CharSequence} does not
* contain a parsable unsigned {@code int} in the specified
* {@code radix}, or if {@code radix} is either smaller than
* {@link java.lang.Character#MIN_RADIX} or larger than
* {@link java.lang.Character#MAX_RADIX}.
! * @since 1.9
*/
public static int parseUnsignedInt(CharSequence s, int beginIndex, int endIndex, int radix)
throws NumberFormatException {
s = Objects.requireNonNull(s);
--- 897,907 ----
* @throws NumberFormatException if the {@code CharSequence} does not
* contain a parsable unsigned {@code int} in the specified
* {@code radix}, or if {@code radix} is either smaller than
* {@link java.lang.Character#MIN_RADIX} or larger than
* {@link java.lang.Character#MAX_RADIX}.
! * @since 9
*/
public static int parseUnsignedInt(CharSequence s, int beginIndex, int endIndex, int radix)
throws NumberFormatException {
s = Objects.requireNonNull(s);
*** 1017,1027 ****
*
* The cache is initialized on first usage. The size of the cache
* 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
! * jdk.internal.misc.VM class.
*/
private static class IntegerCache {
static final int low = -128;
static final int high;
--- 1017,1027 ----
*
* The cache is initialized on first usage. The size of the cache
* 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.
*/
private static class IntegerCache {
static final int low = -128;
static final int high;
*** 1029,1039 ****
static {
// high value may be configured by property
int h = 127;
String integerCacheHighPropValue =
! VM.getSavedProperty("java.lang.Integer.IntegerCache.high");
if (integerCacheHighPropValue != null) {
try {
int i = parseInt(integerCacheHighPropValue);
i = Math.max(i, 127);
// Maximum array size is Integer.MAX_VALUE
--- 1029,1039 ----
static {
// high value may be configured by property
int h = 127;
String integerCacheHighPropValue =
! sun.misc.VM.getSavedProperty("java.lang.Integer.IntegerCache.high");
if (integerCacheHighPropValue != null) {
try {
int i = parseInt(integerCacheHighPropValue);
i = Math.max(i, 127);
// Maximum array size is Integer.MAX_VALUE
< prev index next >