static { // high value may be configured by property inth=127; StringintegerCacheHighPropValue= VM.getSavedProperty("java.lang.Integer.IntegerCache.high"); if (integerCacheHighPropValue != null) { try { h = Math.max(parseInt(integerCacheHighPropValue), 127); // Maximum array size is Integer.MAX_VALUE h = Math.min(h, Integer.MAX_VALUE - (-low) -1); } catch( NumberFormatException nfe) { // If the property cannot be parsed into an int, ignore it. } } high = h;
// Load IntegerCache.archivedCache from archive, if possible CDS.initializeFromArchive(IntegerCache.class); intsize= (high - low) + 1;
// Use the archived cache if it exists and is large enough if (archivedCache == null || size > archivedCache.length) { Integer[] c = newInteger[size]; intj= low; for(inti=0; i < c.length; i++) { c[i] = newInteger(j++); } archivedCache = c; } cache = archivedCache; // range [-128, 127] must be interned (JLS7 5.1.7) assert IntegerCache.high >= 127; }