8049893: Replace uses of 'new Integer()' with appropriate alternative across client classes

Reviewed-by: prr, pchelko
This commit is contained in:
Otavio Goncalves de Santana 2014-07-14 09:48:26 -07:00 committed by Phil Race
parent 229ab7b164
commit acee6fb42a
27 changed files with 110 additions and 121 deletions

@ -126,18 +126,18 @@ public class BMPMetadata extends IIOMetadata implements BMPConstants {
new IIOMetadataNode(nativeMetadataFormatName);
addChildNode(root, "BMPVersion", bmpVersion);
addChildNode(root, "Width", new Integer(width));
addChildNode(root, "Height", new Integer(height));
addChildNode(root, "Width", width);
addChildNode(root, "Height", height);
addChildNode(root, "BitsPerPixel", new Short(bitsPerPixel));
addChildNode(root, "Compression", new Integer(compression));
addChildNode(root, "ImageSize", new Integer(imageSize));
addChildNode(root, "Compression", compression);
addChildNode(root, "ImageSize", imageSize);
IIOMetadataNode node = addChildNode(root, "PixelsPerMeter", null);
addChildNode(node, "X", new Integer(xPixelsPerMeter));
addChildNode(node, "Y", new Integer(yPixelsPerMeter));
addChildNode(node, "X", xPixelsPerMeter);
addChildNode(node, "Y", yPixelsPerMeter);
addChildNode(root, "ColorsUsed", new Integer(colorsUsed));
addChildNode(root, "ColorsImportant", new Integer(colorsImportant));
addChildNode(root, "ColorsUsed", colorsUsed);
addChildNode(root, "ColorsImportant", colorsImportant);
int version = 0;
for (int i = 0; i < bmpVersion.length(); i++)
@ -146,19 +146,19 @@ public class BMPMetadata extends IIOMetadata implements BMPConstants {
if (version >= 4) {
node = addChildNode(root, "Mask", null);
addChildNode(node, "Red", new Integer(redMask));
addChildNode(node, "Green", new Integer(greenMask));
addChildNode(node, "Blue", new Integer(blueMask));
addChildNode(node, "Alpha", new Integer(alphaMask));
addChildNode(node, "Red", redMask);
addChildNode(node, "Green", greenMask);
addChildNode(node, "Blue", blueMask);
addChildNode(node, "Alpha", alphaMask);
addChildNode(root, "ColorSpaceType", new Integer(colorSpace));
addChildNode(root, "ColorSpaceType", colorSpace);
node = addChildNode(root, "CIEXYZEndPoints", null);
addXYZPoints(node, "Red", redX, redY, redZ);
addXYZPoints(node, "Green", greenX, greenY, greenZ);
addXYZPoints(node, "Blue", blueX, blueY, blueZ);
node = addChildNode(root, "Intent", new Integer(intent));
node = addChildNode(root, "Intent", intent);
}
// Palette

@ -2323,7 +2323,7 @@ public class JPEGMetadata extends IIOMetadata implements Cloneable {
SOSMarkerSegment sos = (SOSMarkerSegment) seg;
SOSMarkerSegment.ScanComponentSpec [] specs = sos.componentSpecs;
for (int i = 0; i < specs.length; i++) {
Integer id = new Integer(specs[i].componentSelector);
Integer id = specs[i].componentSelector;
if (!ids.contains(id)) {
ids.add(id);
}

@ -639,7 +639,7 @@ public class PNGImageReader extends ImageReader {
metadata.zTXt_keyword.add(keyword);
int method = stream.readUnsignedByte();
metadata.zTXt_compressionMethod.add(new Integer(method));
metadata.zTXt_compressionMethod.add(method);
byte[] b = new byte[chunkLength - keyword.length() - 2];
stream.readFully(b);

@ -1647,7 +1647,7 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
int compressionMethod =
getEnumeratedAttribute(zTXt_node, "compressionMethod",
zTXt_compressionMethodNames);
zTXt_compressionMethod.add(new Integer(compressionMethod));
zTXt_compressionMethod.add(compressionMethod);
String text = getAttribute(zTXt_node, "text");
zTXt_text.add(text);

@ -75,9 +75,9 @@ public class WBMPMetadata extends IIOMetadata {
IIOMetadataNode root =
new IIOMetadataNode(nativeMetadataFormatName);
addChildNode(root, "WBMPType", new Integer(wbmpType));
addChildNode(root, "Width", new Integer(width));
addChildNode(root, "Height", new Integer(height));
addChildNode(root, "WBMPType", wbmpType);
addChildNode(root, "Width", width);
addChildNode(root, "Height", height);
return root;
}

@ -812,12 +812,12 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
"OptionPane.setButtonMargin", Boolean.FALSE,
"OptionPane.sameSizeButtons", Boolean.TRUE,
"OptionPane.buttonOrientation", new Integer(SwingConstants.RIGHT),
"OptionPane.buttonOrientation", SwingConstants.RIGHT,
"OptionPane.minimumSize", new DimensionUIResource(262, 90),
"OptionPane.buttonPadding", new Integer(10),
"OptionPane.buttonPadding", 10,
"OptionPane.windowBindings", new Object[] {
"ESCAPE", "close" },
"OptionPane.buttonClickThreshhold", new Integer(500),
"OptionPane.buttonClickThreshhold", 500,
"OptionPane.isYesLast", Boolean.TRUE,
"OptionPane.font", new FontLazyValue(Region.OPTION_PANE),

@ -567,7 +567,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
"ProgressBar.selectionForeground", table.get("control"),
"ProgressBar.selectionBackground", table.get("controlText"),
"ProgressBar.border", loweredBevelBorder,
"ProgressBar.cellLength", new Integer(6),
"ProgressBar.cellLength", 6,
"ProgressBar.cellSpacing", Integer.valueOf(0),
// Buttons
@ -582,7 +582,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
"released SPACE", "released"
}),
"CheckBox.textIconGap", new Integer(8),
"CheckBox.textIconGap", 8,
"CheckBox.margin", new InsetsUIResource(4, 2, 4, 2),
"CheckBox.icon", checkBoxIcon,
"CheckBox.focus", table.get("activeCaptionBorder"),
@ -593,7 +593,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
}),
"RadioButton.margin", new InsetsUIResource(4, 2, 4, 2),
"RadioButton.textIconGap", new Integer(8),
"RadioButton.textIconGap", 8,
"RadioButton.background", table.get("control"),
"RadioButton.foreground", table.get("controlText"),
"RadioButton.icon", radioButtonIcon,
@ -627,10 +627,10 @@ public class MotifLookAndFeel extends BasicLookAndFeel
"Menu.selectionBackground", menuItemPressedBackground,
"Menu.checkIcon", menuItemCheckIcon,
"Menu.arrowIcon", menuArrowIcon,
"Menu.menuPopupOffsetX", new Integer(0),
"Menu.menuPopupOffsetY", new Integer(0),
"Menu.submenuPopupOffsetX", new Integer(-2),
"Menu.submenuPopupOffsetY", new Integer(3),
"Menu.menuPopupOffsetX", 0,
"Menu.menuPopupOffsetY", 0,
"Menu.submenuPopupOffsetX", -2,
"Menu.submenuPopupOffsetY", 3,
"Menu.shortcutKeys", new int[]{
SwingUtilities2.getSystemMnemonicKeyMask(),
KeyEvent.META_MASK
@ -938,7 +938,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
"Tree.collapsedIcon", treeCollapsedIcon,
"Tree.editorBorder", focusBorder,
"Tree.editorBorderSelectionColor", table.get("activeCaptionBorder"),
"Tree.rowHeight", new Integer(18),
"Tree.rowHeight", 18,
"Tree.drawsFocusBorderAroundIcon", Boolean.TRUE,
"Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
"COPY", "copy",

@ -370,7 +370,7 @@ public class ParameterBlock implements Cloneable, Serializable {
* the specified parameter.
*/
public ParameterBlock add(int i) {
return add(new Integer(i));
return add(i);
}
/**
@ -489,7 +489,7 @@ public class ParameterBlock implements Cloneable, Serializable {
* the specified parameter.
*/
public ParameterBlock set(int i, int index) {
return set(new Integer(i), index);
return set(i, index);
}
/**

@ -437,7 +437,7 @@ public class EventHandler implements InvocationHandler {
if (method.getDeclaringClass() == Object.class) {
// Handle the Object public methods.
if (methodName.equals("hashCode")) {
return new Integer(System.identityHashCode(proxy));
return System.identityHashCode(proxy);
} else if (methodName.equals("equals")) {
return (proxy == arguments[0] ? Boolean.TRUE : Boolean.FALSE);
} else if (methodName.equals("toString")) {

@ -123,13 +123,13 @@ static final class ArrayPersistenceDelegate extends PersistenceDelegate {
Class<?> oldClass = oldInstance.getClass();
return new Expression(oldInstance, Array.class, "newInstance",
new Object[]{oldClass.getComponentType(),
new Integer(Array.getLength(oldInstance))});
Array.getLength(oldInstance)});
}
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
int n = Array.getLength(oldInstance);
for (int i = 0; i < n; i++) {
Object index = new Integer(i);
Object index = i;
// Expression oldGetExp = new Expression(Array.class, "get", new Object[]{oldInstance, index});
// Expression newGetExp = new Expression(Array.class, "get", new Object[]{newInstance, index});
Expression oldGetExp = new Expression(oldInstance, "get", new Object[]{index});
@ -635,7 +635,7 @@ static class java_util_List_PersistenceDelegate extends DefaultPersistenceDelega
newSize = 0;
}
for (int i = 0; i < newSize; i++) {
Object index = new Integer(i);
Object index = i;
Expression oldGetExp = new Expression(oldInstance, "get", new Object[]{index});
Expression newGetExp = new Expression(newInstance, "get", new Object[]{index});
@ -892,7 +892,7 @@ static final class java_awt_MenuShortcut_PersistenceDelegate extends Persistence
protected Expression instantiate(Object oldInstance, Encoder out) {
java.awt.MenuShortcut m = (java.awt.MenuShortcut)oldInstance;
return new Expression(oldInstance, m.getClass(), "new",
new Object[]{new Integer(m.getKey()), Boolean.valueOf(m.usesShiftModifier())});
new Object[]{m.getKey(), Boolean.valueOf(m.usesShiftModifier())});
}
}

@ -107,7 +107,7 @@ class NameGenerator {
Integer size = nameToCount.get(className);
int instanceNumber = (size == null) ? 0 : (size).intValue() + 1;
nameToCount.put(className, new Integer(instanceNumber));
nameToCount.put(className, instanceNumber);
result = className + instanceNumber;
valueToName.put(instance, result);

@ -170,7 +170,7 @@ class PartialOrderIterator<E> implements Iterator<E> {
while (iter.hasNext()) {
DigraphNode<E> node = iter.next();
int inDegree = node.getInDegree();
inDegrees.put(node, new Integer(inDegree));
inDegrees.put(node, inDegree);
// Add nodes with zero in-degree to the zero list
if (inDegree == 0) {
@ -191,7 +191,7 @@ class PartialOrderIterator<E> implements Iterator<E> {
while (outNodes.hasNext()) {
DigraphNode<E> node = outNodes.next();
int inDegree = inDegrees.get(node).intValue() - 1;
inDegrees.put(node, new Integer(inDegree));
inDegrees.put(node, inDegree);
// If the in-degree has fallen to 0, place the node on the list
if (inDegree == 0) {

@ -914,7 +914,7 @@ public class MidiSystem {
MidiFileWriter writer = providers.get(i);
int[] types = writer.getMidiFileTypes();
for (int j = 0; j < types.length; j++ ) {
allTypes.add(new Integer(types[j]));
allTypes.add(types[j]);
}
}
int resultTypes[] = new int[allTypes.size()];
@ -968,7 +968,7 @@ public class MidiSystem {
MidiFileWriter writer = providers.get(i);
int[] types = writer.getMidiFileTypes(sequence);
for (int j = 0; j < types.length; j++ ) {
allTypes.add(new Integer(types[j]));
allTypes.add(types[j]);
}
}
int resultTypes[] = new int[allTypes.size()];

@ -2107,7 +2107,7 @@ public class JInternalFrame extends JComponent implements
if (n == null) {
return false;
}
setLayer(new Integer(n.intValue()));
setLayer(Integer.valueOf(n.intValue()));
return true;
}

@ -159,15 +159,15 @@ import javax.accessibility.*;
public class JLayeredPane extends JComponent implements Accessible {
/// Watch the values in getObjectForLayer()
/** Convenience object defining the Default layer. Equivalent to new Integer(0).*/
public final static Integer DEFAULT_LAYER = new Integer(0);
public final static Integer DEFAULT_LAYER = 0;
/** Convenience object defining the Palette layer. Equivalent to new Integer(100).*/
public final static Integer PALETTE_LAYER = new Integer(100);
public final static Integer PALETTE_LAYER = 100;
/** Convenience object defining the Modal layer. Equivalent to new Integer(200).*/
public final static Integer MODAL_LAYER = new Integer(200);
public final static Integer MODAL_LAYER = 200;
/** Convenience object defining the Popup layer. Equivalent to new Integer(300).*/
public final static Integer POPUP_LAYER = new Integer(300);
public final static Integer POPUP_LAYER = 300;
/** Convenience object defining the Drag layer. Equivalent to new Integer(400).*/
public final static Integer DRAG_LAYER = new Integer(400);
public final static Integer DRAG_LAYER = 400;
/** Convenience object defining the Frame Content layer.
* This layer is normally only use to position the contentPane and menuBar
* components of JFrame.
@ -294,10 +294,7 @@ public class JLayeredPane extends JComponent implements Accessible {
*/
public static void putLayer(JComponent c, int layer) {
/// MAKE SURE THIS AND setLayer(Component c, int layer, int position) are SYNCED
Integer layerObj;
layerObj = new Integer(layer);
c.putClientProperty(LAYER_PROPERTY, layerObj);
c.putClientProperty(LAYER_PROPERTY, layer);
}
/** Gets the layer property for a JComponent, it
@ -609,27 +606,20 @@ public class JLayeredPane extends JComponent implements Accessible {
* @return an Integer object for that layer
*/
protected Integer getObjectForLayer(int layer) {
Integer layerObj;
switch(layer) {
case 0:
layerObj = DEFAULT_LAYER;
break;
return DEFAULT_LAYER;
case 100:
layerObj = PALETTE_LAYER;
break;
return PALETTE_LAYER;
case 200:
layerObj = MODAL_LAYER;
break;
return MODAL_LAYER;
case 300:
layerObj = POPUP_LAYER;
break;
return POPUP_LAYER;
case 400:
layerObj = DRAG_LAYER;
break;
return DRAG_LAYER;
default:
layerObj = new Integer(layer);
return layer;
}
return layerObj;
}
/**

@ -341,7 +341,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
if (accessibleContext != null) {
accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
oldValue, new Integer(model.getValue()));
oldValue, model.getValue());
}
}
@ -952,7 +952,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
*/
public Number getMaximumAccessibleValue() {
// TIGER - 4422362
return new Integer(model.getMaximum() - model.getExtent());
return model.getMaximum() - model.getExtent();
}
} // AccessibleJScrollBar

@ -645,7 +645,7 @@ class UnixFileSystemView extends FileSystemView {
int i = 1;
while (newFolder.exists() && i < 100) {
newFolder = createFileObject(containingDir, MessageFormat.format(
newFolderNextString, new Integer(i)));
newFolderNextString, i));
i++;
}
@ -754,7 +754,7 @@ class WindowsFileSystemView extends FileSystemView {
int i = 2;
while (newFolder.exists() && i < 100) {
newFolder = createFileObject(containingDir, MessageFormat.format(
newFolderNextString, new Integer(i)));
newFolderNextString, i));
i++;
}

@ -455,7 +455,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
initResourceBundle(table);
// *** Shared Integers
Integer fiveHundred = new Integer(500);
Integer fiveHundred = 500;
// *** Shared Longs
Long oneThousand = 1000L;
@ -673,7 +673,6 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
Object editorMargin = threeInsets;
Object caretBlinkRate = fiveHundred;
Integer four = new Integer(4);
Object[] allAuditoryCues = new Object[] {
"CheckBoxMenuItem.commandSound",
@ -714,7 +713,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
"Button.highlight", controlLtHighlight,
"Button.border", buttonBorder,
"Button.margin", new InsetsUIResource(2, 14, 2, 14),
"Button.textIconGap", four,
"Button.textIconGap", 4,
"Button.textShiftOffset", zero,
"Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
"SPACE", "pressed",
@ -732,7 +731,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
"ToggleButton.highlight", controlLtHighlight,
"ToggleButton.border", buttonToggleBorder,
"ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14),
"ToggleButton.textIconGap", four,
"ToggleButton.textIconGap", 4,
"ToggleButton.textShiftOffset", zero,
"ToggleButton.focusInputMap",
new UIDefaults.LazyInputMap(new Object[] {
@ -749,7 +748,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
"RadioButton.highlight", controlLtHighlight,
"RadioButton.border", radioButtonBorder,
"RadioButton.margin", twoInsets,
"RadioButton.textIconGap", four,
"RadioButton.textIconGap", 4,
"RadioButton.textShiftOffset", zero,
"RadioButton.icon", radioButtonIcon,
"RadioButton.focusInputMap",
@ -764,7 +763,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
"CheckBox.foreground", controlText,
"CheckBox.border", radioButtonBorder,
"CheckBox.margin", twoInsets,
"CheckBox.textIconGap", four,
"CheckBox.textIconGap", 4,
"CheckBox.textShiftOffset", zero,
"CheckBox.icon", checkBoxIcon,
"CheckBox.focusInputMap",
@ -1087,10 +1086,10 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
"Menu.margin", twoInsets,
"Menu.checkIcon", menuItemCheckIcon,
"Menu.arrowIcon", menuArrowIcon,
"Menu.menuPopupOffsetX", new Integer(0),
"Menu.menuPopupOffsetY", new Integer(0),
"Menu.submenuPopupOffsetX", new Integer(0),
"Menu.submenuPopupOffsetY", new Integer(0),
"Menu.menuPopupOffsetX", 0,
"Menu.menuPopupOffsetY", 0,
"Menu.submenuPopupOffsetX", 0,
"Menu.submenuPopupOffsetY", 0,
"Menu.shortcutKeys", new int[]{
SwingUtilities2.getSystemMnemonicKeyMask()
},
@ -1188,10 +1187,10 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
"ProgressBar.selectionForeground", control,
"ProgressBar.selectionBackground", textHighlight,
"ProgressBar.border", progressBarBorder,
"ProgressBar.cellLength", new Integer(1),
"ProgressBar.cellLength", 1,
"ProgressBar.cellSpacing", zero,
"ProgressBar.repaintInterval", new Integer(50),
"ProgressBar.cycleTime", new Integer(3000),
"ProgressBar.repaintInterval", 50,
"ProgressBar.cycleTime", 3000,
"ProgressBar.horizontalSize", new DimensionUIResource(146, 12),
"ProgressBar.verticalSize", new DimensionUIResource(12, 146),
@ -1236,7 +1235,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
"LEFT", "positiveUnitIncrement",
"KP_LEFT", "positiveUnitIncrement",
}),
"ScrollBar.width", new Integer(16),
"ScrollBar.width", 16,
"ScrollPane.font", dialogPlain12,
"ScrollPane.background", control,
@ -1332,7 +1331,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
"SplitPane.shadow", controlShadow,
"SplitPane.darkShadow", controlDkShadow,
"SplitPane.border", splitPaneBorder,
"SplitPane.dividerSize", new Integer(7),
"SplitPane.dividerSize", 7,
"SplitPaneDivider.border", splitPaneDividerBorder,
"SplitPaneDivider.draggingColor", darkGray,
"SplitPane.ancestorInputMap",
@ -1363,7 +1362,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
"TabbedPane.darkShadow", controlDkShadow,
"TabbedPane.selected", null,
"TabbedPane.focus", controlText,
"TabbedPane.textIconGap", four,
"TabbedPane.textIconGap", 4,
// Causes tabs to be painted on top of the content area border.
// The amount of overlap is then controlled by tabAreaInsets.bottom,
@ -1377,7 +1376,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
"TabbedPane.selectedTabPadInsets", tabbedPaneTabPadInsets,
"TabbedPane.tabAreaInsets", tabbedPaneTabAreaInsets,
"TabbedPane.contentBorderInsets", tabbedPaneContentBorderInsets,
"TabbedPane.tabRunOverlay", new Integer(2),
"TabbedPane.tabRunOverlay", 2,
"TabbedPane.tabsOpaque", Boolean.TRUE,
"TabbedPane.contentOpaque", Boolean.TRUE,
"TabbedPane.focusInputMap",
@ -1737,9 +1736,9 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
"Tree.selectionBorderColor", black,
"Tree.dropLineColor", controlShadow,
"Tree.editorBorder", blackLineBorder,
"Tree.leftChildIndent", new Integer(7),
"Tree.rightChildIndent", new Integer(13),
"Tree.rowHeight", new Integer(16),
"Tree.leftChildIndent", 7,
"Tree.rightChildIndent", 13,
"Tree.rowHeight", 16,
"Tree.scrollsOnExpand", Boolean.TRUE,
"Tree.openIcon", SwingUtilities2.makeIcon(getClass(),
BasicLookAndFeel.class,

@ -633,7 +633,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
LazyValue toolBarBorder = t -> new MetalBorders.ToolBarBorder();
LazyValue progressBarBorder = t ->
new BorderUIResource.LineBorderUIResource(controlDarkShadow, new Integer(1));
new BorderUIResource.LineBorderUIResource(controlDarkShadow, 1);
LazyValue toolTipBorder = t ->
new BorderUIResource.LineBorderUIResource(primaryControlDarkShadow);
@ -851,8 +851,8 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"Slider.foreground", primaryControlShadow,
"Slider.focus", focusColor,
"Slider.focusInsets", zeroInsets,
"Slider.trackWidth", new Integer( 7 ),
"Slider.majorTickLength", new Integer( 6 ),
"Slider.trackWidth", 7 ,
"Slider.majorTickLength", 6 ,
"Slider.horizontalThumbIcon",(LazyValue) t -> MetalIconFactory.getHorizontalSliderThumbIcon(),
"Slider.verticalThumbIcon",(LazyValue) t -> MetalIconFactory.getVerticalSliderThumbIcon(),
"Slider.focusInputMap",
@ -914,7 +914,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
new MetalBorders.OptionDialogBorder(),
"InternalFrame.paletteBorder",(LazyValue) t ->
new MetalBorders.PaletteBorder(),
"InternalFrame.paletteTitleHeight", new Integer(11),
"InternalFrame.paletteTitleHeight", 11,
"InternalFrame.paletteCloseIcon",(LazyValue) t ->
new MetalIconFactory.PaletteCloseIcon(),
"InternalFrame.closeIcon",
@ -1067,7 +1067,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"ScrollBar.thumb", primaryControlShadow,
"ScrollBar.thumbShadow", primaryControlDarkShadow,
"ScrollBar.thumbHighlight", primaryControl,
"ScrollBar.width", new Integer( 17 ),
"ScrollBar.width", 17 ,
"ScrollBar.allowsAbsolutePositioning", Boolean.TRUE,
"ScrollBar.ancestorInputMap",
new UIDefaults.LazyInputMap(new Object[] {
@ -1238,8 +1238,8 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"Menu.borderPainted", Boolean.TRUE,
"Menu.menuPopupOffsetX", zero,
"Menu.menuPopupOffsetY", zero,
"Menu.submenuPopupOffsetX", new Integer(-4),
"Menu.submenuPopupOffsetY", new Integer(-3),
"Menu.submenuPopupOffsetX", -4,
"Menu.submenuPopupOffsetY", -3,
"Menu.font", menuTextValue,
"Menu.selectionForeground", menuSelectedForeground,
"Menu.selectionBackground", menuSelectedBackground,
@ -1354,7 +1354,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
// SplitPane
"SplitPane.dividerSize", new Integer(10),
"SplitPane.dividerSize", 10,
"SplitPane.ancestorInputMap",
new UIDefaults.LazyInputMap(new Object[] {
"UP", "negativeIncrement",

@ -764,7 +764,7 @@ class SynthParser extends DefaultHandler {
break;
case 4: // integer
try {
value = new Integer(Integer.parseInt(aValue));
value = Integer.valueOf(aValue);
} catch (NumberFormatException nfe) {
throw new SAXException(property + " invalid value");
}

@ -2556,7 +2556,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A
if (caretPos != dot) {
// the caret moved
firePropertyChange(ACCESSIBLE_CARET_PROPERTY,
new Integer(caretPos), new Integer(dot));
caretPos, dot);
caretPos = dot;
try {

@ -1934,13 +1934,13 @@ public class CSS implements Serializable {
return Boolean.FALSE;
} else if (key == StyleConstants.Alignment) {
if (svalue.equals("right")) {
return new Integer(StyleConstants.ALIGN_RIGHT);
return StyleConstants.ALIGN_RIGHT;
} else if (svalue.equals("center")) {
return new Integer(StyleConstants.ALIGN_CENTER);
return StyleConstants.ALIGN_CENTER;
} else if (svalue.equals("justify")) {
return new Integer(StyleConstants.ALIGN_JUSTIFIED);
return StyleConstants.ALIGN_JUSTIFIED;
}
return new Integer(StyleConstants.ALIGN_LEFT);
return StyleConstants.ALIGN_LEFT;
} else if (key == StyleConstants.StrikeThrough) {
if (svalue.indexOf("line-through") >= 0) {
return Boolean.TRUE;

@ -623,7 +623,7 @@ public class HTMLDocument extends DefaultStyledDocument {
* @param n the number of tokens to buffer
*/
public void setTokenThreshold(int n) {
putProperty(TokenThreshold, new Integer(n));
putProperty(TokenThreshold, n);
}
/**

@ -165,14 +165,14 @@ public void examineElement(Element el)
foregroundColor = StyleConstants.getForeground(a);
if (foregroundColor != null &&
colorTable.get(foregroundColor) == null) {
colorTable.put(foregroundColor, new Integer(colorCount));
colorTable.put(foregroundColor, colorCount);
colorCount ++;
}
backgroundColor = a.getAttribute(StyleConstants.Background);
if (backgroundColor != null &&
colorTable.get(backgroundColor) == null) {
colorTable.put(backgroundColor, new Integer(colorCount));
colorTable.put(backgroundColor, colorCount);
colorCount ++;
}
@ -183,7 +183,7 @@ public void examineElement(Element el)
if (fontName != null &&
fontTable.get(fontName) == null) {
fontTable.put(fontName, new Integer(fontCount));
fontTable.put(fontName, fontCount);
fontCount ++;
}
}
@ -200,7 +200,7 @@ private void tallyStyles(AttributeSet a) {
Integer aNum = styleTable.get(a);
if (aNum == null) {
styleCount = styleCount + 1;
aNum = new Integer(styleCount);
aNum = styleCount;
styleTable.put(a, aNum);
}
}

@ -1322,7 +1322,7 @@ public final class SunGraphics2D
return SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS,
fractionalMetricsHint);
case SunHints.INTKEY_AATEXT_LCD_CONTRAST:
return new Integer(lcdTextContrast);
return lcdTextContrast;
case SunHints.INTKEY_INTERPOLATION:
switch (interpolationHint) {
case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR:

@ -1017,8 +1017,8 @@ public class ServiceDialog extends JDialog implements ActionListener {
format.setParseIntegerOnly(true);
format.setDecimalSeparatorAlwaysShown(false);
NumberFormatter nf = new NumberFormatter(format);
nf.setMinimum(new Integer(1));
nf.setMaximum(new Integer(Integer.MAX_VALUE));
nf.setMinimum(1);
nf.setMaximum(Integer.MAX_VALUE);
nf.setAllowsInvalid(true);
nf.setCommitsOnValidEdit(true);
tfRangeFrom = new JFormattedTextField(nf);
@ -1110,12 +1110,12 @@ public class ServiceDialog extends JDialog implements ActionListener {
if (min < 1) {
min = 1;
tfRangeFrom.setValue(new Integer(1));
tfRangeFrom.setValue(1);
}
if (max < min) {
max = min;
tfRangeTo.setValue(new Integer(min));
tfRangeTo.setValue(min);
}
PageRanges pr = new PageRanges(min, max);
@ -1165,8 +1165,8 @@ public class ServiceDialog extends JDialog implements ActionListener {
} else { // RANGE
rbPages.setSelected(true);
}
tfRangeFrom.setValue(new Integer(min));
tfRangeTo.setValue(new Integer(max));
tfRangeFrom.setValue(min);
tfRangeTo.setValue(max);
rbAll.setEnabled(prSupported);
rbPages.setEnabled(prSupported);
setupRangeWidgets();
@ -1274,14 +1274,14 @@ public class ServiceDialog extends JDialog implements ActionListener {
min = 1;
max = Integer.MAX_VALUE;
}
snModel.setMinimum(new Integer(min));
snModel.setMaximum(new Integer(max));
snModel.setMinimum(min);
snModel.setMaximum(max);
int value = cp.getValue();
if ((value < min) || (value > max)) {
value = min;
}
snModel.setValue(new Integer(value));
snModel.setValue(value);
// setup Collate checkbox
if (psCurrent.isAttributeCategorySupported(scCategory)) {
@ -2762,7 +2762,7 @@ public class ServiceDialog extends JDialog implements ActionListener {
if ((value < 1) || (value > 100)) {
value = 1;
}
snModel.setValue(new Integer(value));
snModel.setValue(value);
lblPriority.setEnabled(jpSupported);
spinPriority.setEnabled(jpSupported);

@ -295,7 +295,7 @@ public class PrintingStatus {
private void updateStatusOnEDT(int pageIndex) {
assert SwingUtilities.isEventDispatchThread();
Object[] pageNumber = new Object[]{
new Integer(pageIndex + 1)};
pageIndex + 1};
statusLabel.setText(statusFormat.format(pageNumber));
}
}