提交 aa8e63c1 编写于 作者: D dav

6613529: Avoid duplicate object creation within JDK packages

Summary: avoid using constructors when unique values are not necessary
Reviewed-by: volk, igor, peterz
上级 7f4b0522
...@@ -504,7 +504,7 @@ public class GIFImageReader extends ImageReader { ...@@ -504,7 +504,7 @@ public class GIFImageReader extends ImageReader {
} }
// Found position of metadata for image 0 // Found position of metadata for image 0
imageStartPosition.add(new Long(stream.getStreamPosition())); imageStartPosition.add(Long.valueOf(stream.getStreamPosition()));
} catch (IOException e) { } catch (IOException e) {
throw new IIOException("I/O error reading header!", e); throw new IIOException("I/O error reading header!", e);
} }
......
...@@ -98,7 +98,7 @@ class GIFWritableImageMetadata extends GIFImageMetadata { ...@@ -98,7 +98,7 @@ class GIFWritableImageMetadata extends GIFImageMetadata {
try { try {
return data.getBytes("ISO-8859-1"); return data.getBytes("ISO-8859-1");
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
return (new String("")).getBytes(); return "".getBytes();
} }
} }
......
...@@ -328,7 +328,7 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements ...@@ -328,7 +328,7 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
setHSB(hue, saturation, brightness); setHSB(hue, saturation, brightness);
if (update) { if (update) {
settingColor = true; settingColor = true;
hueSpinner.setValue(new Integer((int)(hue * 360))); hueSpinner.setValue(Integer.valueOf((int)(hue * 360)));
settingColor = false; settingColor = false;
} }
} }
...@@ -376,8 +376,8 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements ...@@ -376,8 +376,8 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
setHSB(hue, s, b); setHSB(hue, s, b);
if (update) { if (update) {
settingColor = true; settingColor = true;
saturationSpinner.setValue(new Integer((int)(s * 255))); saturationSpinner.setValue(Integer.valueOf((int)(s * 255)));
valueSpinner.setValue(new Integer((int)(b * 255))); valueSpinner.setValue(Integer.valueOf((int)(b * 255)));
settingColor = false; settingColor = false;
} }
} }
...@@ -391,9 +391,9 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements ...@@ -391,9 +391,9 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
setColor(color, false, true, true); setColor(color, false, true, true);
settingColor = true; settingColor = true;
hueSpinner.setValue(new Integer((int)(hue * 360))); hueSpinner.setValue(Integer.valueOf((int)(hue * 360)));
saturationSpinner.setValue(new Integer((int)(saturation * 255))); saturationSpinner.setValue(Integer.valueOf((int)(saturation * 255)));
valueSpinner.setValue(new Integer((int)(brightness * 255))); valueSpinner.setValue(Integer.valueOf((int)(brightness * 255)));
settingColor = false; settingColor = false;
} }
...@@ -409,9 +409,9 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements ...@@ -409,9 +409,9 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
setColor(color, false, false, true); setColor(color, false, false, true);
settingColor = true; settingColor = true;
redSpinner.setValue(new Integer(color.getRed())); redSpinner.setValue(Integer.valueOf(color.getRed()));
greenSpinner.setValue(new Integer(color.getGreen())); greenSpinner.setValue(Integer.valueOf(color.getGreen()));
blueSpinner.setValue(new Integer(color.getBlue())); blueSpinner.setValue(Integer.valueOf(color.getBlue()));
settingColor = false; settingColor = false;
} }
...@@ -454,13 +454,13 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements ...@@ -454,13 +454,13 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
colorNameTF.setText("#" + hexString.substring(1)); colorNameTF.setText("#" + hexString.substring(1));
if (updateSpinners) { if (updateSpinners) {
redSpinner.setValue(new Integer(color.getRed())); redSpinner.setValue(Integer.valueOf(color.getRed()));
greenSpinner.setValue(new Integer(color.getGreen())); greenSpinner.setValue(Integer.valueOf(color.getGreen()));
blueSpinner.setValue(new Integer(color.getBlue())); blueSpinner.setValue(Integer.valueOf(color.getBlue()));
hueSpinner.setValue(new Integer((int)(hue * 360))); hueSpinner.setValue(Integer.valueOf((int)(hue * 360)));
saturationSpinner.setValue(new Integer((int)(saturation * 255))); saturationSpinner.setValue(Integer.valueOf((int)(saturation * 255)));
valueSpinner.setValue(new Integer((int)(brightness * 255))); valueSpinner.setValue(Integer.valueOf((int)(brightness * 255)));
} }
settingColor = false; settingColor = false;
} }
......
...@@ -336,7 +336,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel { ...@@ -336,7 +336,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
// populate the table with the values from basic. // populate the table with the values from basic.
super.initComponentDefaults(table); super.initComponentDefaults(table);
Integer zero = new Integer(0); Integer zero = Integer.valueOf(0);
Object zeroBorder = new sun.swing.SwingLazyValue( Object zeroBorder = new sun.swing.SwingLazyValue(
"javax.swing.plaf.BorderUIResource$EmptyBorderUIResource", "javax.swing.plaf.BorderUIResource$EmptyBorderUIResource",
new Object[] {zero, zero, zero, zero}); new Object[] {zero, zero, zero, zero});
...@@ -371,7 +371,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel { ...@@ -371,7 +371,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
int vProgWidth = 22 - (progXThickness * 2); int vProgWidth = 22 - (progXThickness * 2);
int vProgHeight = 80 - (progYThickness * 2); int vProgHeight = 80 - (progYThickness * 2);
Integer caretBlinkRate = new Integer(500); Integer caretBlinkRate = Integer.valueOf(500);
Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0); Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0);
Double defaultCaretAspectRatio = new Double(0.025); Double defaultCaretAspectRatio = new Double(0.025);
...@@ -540,7 +540,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel { ...@@ -540,7 +540,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
} }
Object[] defaults = new Object[] { Object[] defaults = new Object[] {
"ArrowButton.size", new Integer(13), "ArrowButton.size", Integer.valueOf(13),
"Button.defaultButtonFollowsFocus", Boolean.FALSE, "Button.defaultButtonFollowsFocus", Boolean.FALSE,
...@@ -893,8 +893,8 @@ public class GTKLookAndFeel extends SynthLookAndFeel { ...@@ -893,8 +893,8 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
"ScrollBar.squareButtons", Boolean.FALSE, "ScrollBar.squareButtons", Boolean.FALSE,
"ScrollBar.thumbHeight", new Integer(14), "ScrollBar.thumbHeight", Integer.valueOf(14),
"ScrollBar.width", new Integer(16), "ScrollBar.width", Integer.valueOf(16),
"ScrollBar.minimumThumbSize", new Dimension(8, 8), "ScrollBar.minimumThumbSize", new Dimension(8, 8),
"ScrollBar.maximumThumbSize", new Dimension(4096, 4096), "ScrollBar.maximumThumbSize", new Dimension(4096, 4096),
"ScrollBar.allowsAbsolutePositioning", Boolean.TRUE, "ScrollBar.allowsAbsolutePositioning", Boolean.TRUE,
...@@ -954,12 +954,12 @@ public class GTKLookAndFeel extends SynthLookAndFeel { ...@@ -954,12 +954,12 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
"Separator.insets", zeroInsets, "Separator.insets", zeroInsets,
"Separator.thickness", new Integer(2), "Separator.thickness", Integer.valueOf(2),
"Slider.paintValue", Boolean.TRUE, "Slider.paintValue", Boolean.TRUE,
"Slider.thumbWidth", new Integer(30), "Slider.thumbWidth", Integer.valueOf(30),
"Slider.thumbHeight", new Integer(14), "Slider.thumbHeight", Integer.valueOf(14),
"Slider.focusInputMap", "Slider.focusInputMap",
new UIDefaults.LazyInputMap(new Object[] { new UIDefaults.LazyInputMap(new Object[] {
"RIGHT", "positiveUnitIncrement", "RIGHT", "positiveUnitIncrement",
...@@ -1013,9 +1013,9 @@ public class GTKLookAndFeel extends SynthLookAndFeel { ...@@ -1013,9 +1013,9 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
}), }),
"SplitPane.size", new Integer(7), "SplitPane.size", Integer.valueOf(7),
"SplitPane.oneTouchOffset", new Integer(2), "SplitPane.oneTouchOffset", Integer.valueOf(2),
"SplitPane.oneTouchButtonSize", new Integer(5), "SplitPane.oneTouchButtonSize", Integer.valueOf(5),
"SplitPane.supportsOneTouchButtons", Boolean.FALSE, "SplitPane.supportsOneTouchButtons", Boolean.FALSE,
...@@ -1223,13 +1223,13 @@ public class GTKLookAndFeel extends SynthLookAndFeel { ...@@ -1223,13 +1223,13 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
"ToolTip.font", new FontLazyValue(Region.TOOL_TIP), "ToolTip.font", new FontLazyValue(Region.TOOL_TIP),
"Tree.padding", new Integer(4), "Tree.padding", Integer.valueOf(4),
"Tree.background", tableBg, "Tree.background", tableBg,
"Tree.drawHorizontalLines", Boolean.FALSE, "Tree.drawHorizontalLines", Boolean.FALSE,
"Tree.drawVerticalLines", Boolean.FALSE, "Tree.drawVerticalLines", Boolean.FALSE,
"Tree.rowHeight", new Integer(-1), "Tree.rowHeight", Integer.valueOf(-1),
"Tree.scrollsOnExpand", Boolean.FALSE, "Tree.scrollsOnExpand", Boolean.FALSE,
"Tree.expanderSize", new Integer(10), "Tree.expanderSize", Integer.valueOf(10),
"Tree.repaintWholeRow", Boolean.TRUE, "Tree.repaintWholeRow", Boolean.TRUE,
"Tree.closedIcon", null, "Tree.closedIcon", null,
"Tree.leafIcon", null, "Tree.leafIcon", null,
...@@ -1240,8 +1240,8 @@ public class GTKLookAndFeel extends SynthLookAndFeel { ...@@ -1240,8 +1240,8 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
"Tree.collapsedIcon", new GTKStyle.GTKLazyValue( "Tree.collapsedIcon", new GTKStyle.GTKLazyValue(
"com.sun.java.swing.plaf.gtk.GTKIconFactory", "com.sun.java.swing.plaf.gtk.GTKIconFactory",
"getTreeCollapsedIcon"), "getTreeCollapsedIcon"),
"Tree.leftChildIndent", new Integer(2), "Tree.leftChildIndent", Integer.valueOf(2),
"Tree.rightChildIndent", new Integer(12), "Tree.rightChildIndent", Integer.valueOf(12),
"Tree.scrollsHorizontallyAndVertically", Boolean.FALSE, "Tree.scrollsHorizontallyAndVertically", Boolean.FALSE,
"Tree.drawsFocusBorder", Boolean.TRUE, "Tree.drawsFocusBorder", Boolean.TRUE,
"Tree.focusInputMap", "Tree.focusInputMap",
......
...@@ -851,7 +851,7 @@ class GTKStyle extends SynthStyle implements GTKConstants { ...@@ -851,7 +851,7 @@ class GTKStyle extends SynthStyle implements GTKConstants {
int focusLineWidth = getClassSpecificIntValue(context, int focusLineWidth = getClassSpecificIntValue(context,
"focus-line-width", 0); "focus-line-width", 0);
if (value == null && focusLineWidth > 0) { if (value == null && focusLineWidth > 0) {
value = new Integer(16 + 2 * focusLineWidth); value = Integer.valueOf(16 + 2 * focusLineWidth);
} }
} }
return value; return value;
...@@ -975,12 +975,12 @@ class GTKStyle extends SynthStyle implements GTKConstants { ...@@ -975,12 +975,12 @@ class GTKStyle extends SynthStyle implements GTKConstants {
private static void initIconTypeMap() { private static void initIconTypeMap() {
ICON_TYPE_MAP = new HashMap<String,Integer>(); ICON_TYPE_MAP = new HashMap<String,Integer>();
ICON_TYPE_MAP.put("gtk-menu", new Integer(1)); ICON_TYPE_MAP.put("gtk-menu", Integer.valueOf(1));
ICON_TYPE_MAP.put("gtk-small-toolbar", new Integer(2)); ICON_TYPE_MAP.put("gtk-small-toolbar", Integer.valueOf(2));
ICON_TYPE_MAP.put("gtk-large-toolbar", new Integer(3)); ICON_TYPE_MAP.put("gtk-large-toolbar", Integer.valueOf(3));
ICON_TYPE_MAP.put("gtk-button", new Integer(4)); ICON_TYPE_MAP.put("gtk-button", Integer.valueOf(4));
ICON_TYPE_MAP.put("gtk-dnd", new Integer(5)); ICON_TYPE_MAP.put("gtk-dnd", Integer.valueOf(5));
ICON_TYPE_MAP.put("gtk-dialog", new Integer(6)); ICON_TYPE_MAP.put("gtk-dialog", Integer.valueOf(6));
} }
} }
......
...@@ -178,7 +178,7 @@ class Metacity implements SynthConstants { ...@@ -178,7 +178,7 @@ class Metacity implements SynthConstants {
name = child.getNodeName(); name = child.getNodeName();
Object value = null; Object value = null;
if ("distance".equals(name)) { if ("distance".equals(name)) {
value = new Integer(getIntAttr(child, "value", 0)); value = Integer.valueOf(getIntAttr(child, "value", 0));
} else if ("border".equals(name)) { } else if ("border".equals(name)) {
value = new Insets(getIntAttr(child, "top", 0), value = new Insets(getIntAttr(child, "top", 0),
getIntAttr(child, "left", 0), getIntAttr(child, "left", 0),
...@@ -808,7 +808,7 @@ class Metacity implements SynthConstants { ...@@ -808,7 +808,7 @@ class Metacity implements SynthConstants {
protected void setFrameGeometry(JComponent titlePane, Map gm) { protected void setFrameGeometry(JComponent titlePane, Map gm) {
this.frameGeometry = gm; this.frameGeometry = gm;
if (getInt("top_height") == 0 && titlePane != null) { if (getInt("top_height") == 0 && titlePane != null) {
gm.put("top_height", new Integer(titlePane.getHeight())); gm.put("top_height", Integer.valueOf(titlePane.getHeight()));
} }
} }
......
...@@ -567,7 +567,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel ...@@ -567,7 +567,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
"ProgressBar.selectionBackground", table.get("controlText"), "ProgressBar.selectionBackground", table.get("controlText"),
"ProgressBar.border", loweredBevelBorder, "ProgressBar.border", loweredBevelBorder,
"ProgressBar.cellLength", new Integer(6), "ProgressBar.cellLength", new Integer(6),
"ProgressBar.cellSpacing", new Integer(0), "ProgressBar.cellSpacing", Integer.valueOf(0),
// Buttons // Buttons
"Button.margin", new InsetsUIResource(2, 4, 2, 4), "Button.margin", new InsetsUIResource(2, 4, 2, 4),
...@@ -859,7 +859,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel ...@@ -859,7 +859,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
"SplitPane.background", table.get("control"), "SplitPane.background", table.get("control"),
"SplitPane.highlight", table.get("controlHighlight"), "SplitPane.highlight", table.get("controlHighlight"),
"SplitPane.shadow", table.get("controlShadow"), "SplitPane.shadow", table.get("controlShadow"),
"SplitPane.dividerSize", new Integer(20), "SplitPane.dividerSize", Integer.valueOf(20),
"SplitPane.activeThumb", table.get("activeCaptionBorder"), "SplitPane.activeThumb", table.get("activeCaptionBorder"),
"SplitPane.ancestorInputMap", "SplitPane.ancestorInputMap",
new UIDefaults.LazyInputMap(new Object[] { new UIDefaults.LazyInputMap(new Object[] {
...@@ -1160,7 +1160,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel ...@@ -1160,7 +1160,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
}), }),
"TextField.caretForeground", black, "TextField.caretForeground", black,
"TextField.caretBlinkRate", new Integer(500), "TextField.caretBlinkRate", Integer.valueOf(500),
"TextField.inactiveForeground", table.get("textInactiveText"), "TextField.inactiveForeground", table.get("textInactiveText"),
"TextField.selectionBackground", table.get("textHighlight"), "TextField.selectionBackground", table.get("textHighlight"),
"TextField.selectionForeground", table.get("textHighlightText"), "TextField.selectionForeground", table.get("textHighlightText"),
...@@ -1171,7 +1171,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel ...@@ -1171,7 +1171,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
"TextField.focusInputMap", fieldInputMap, "TextField.focusInputMap", fieldInputMap,
"PasswordField.caretForeground", black, "PasswordField.caretForeground", black,
"PasswordField.caretBlinkRate", new Integer(500), "PasswordField.caretBlinkRate", Integer.valueOf(500),
"PasswordField.inactiveForeground", table.get("textInactiveText"), "PasswordField.inactiveForeground", table.get("textInactiveText"),
"PasswordField.selectionBackground", table.get("textHighlight"), "PasswordField.selectionBackground", table.get("textHighlight"),
"PasswordField.selectionForeground", table.get("textHighlightText"), "PasswordField.selectionForeground", table.get("textHighlightText"),
...@@ -1182,7 +1182,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel ...@@ -1182,7 +1182,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
"PasswordField.focusInputMap", passwordInputMap, "PasswordField.focusInputMap", passwordInputMap,
"TextArea.caretForeground", black, "TextArea.caretForeground", black,
"TextArea.caretBlinkRate", new Integer(500), "TextArea.caretBlinkRate", Integer.valueOf(500),
"TextArea.inactiveForeground", table.get("textInactiveText"), "TextArea.inactiveForeground", table.get("textInactiveText"),
"TextArea.selectionBackground", table.get("textHighlight"), "TextArea.selectionBackground", table.get("textHighlight"),
"TextArea.selectionForeground", table.get("textHighlightText"), "TextArea.selectionForeground", table.get("textHighlightText"),
...@@ -1193,7 +1193,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel ...@@ -1193,7 +1193,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
"TextArea.focusInputMap", multilineInputMap, "TextArea.focusInputMap", multilineInputMap,
"TextPane.caretForeground", black, "TextPane.caretForeground", black,
"TextPane.caretBlinkRate", new Integer(500), "TextPane.caretBlinkRate", Integer.valueOf(500),
"TextPane.inactiveForeground", table.get("textInactiveText"), "TextPane.inactiveForeground", table.get("textInactiveText"),
"TextPane.selectionBackground", lightGray, "TextPane.selectionBackground", lightGray,
"TextPane.selectionForeground", table.get("textHighlightText"), "TextPane.selectionForeground", table.get("textHighlightText"),
...@@ -1204,7 +1204,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel ...@@ -1204,7 +1204,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
"TextPane.focusInputMap", multilineInputMap, "TextPane.focusInputMap", multilineInputMap,
"EditorPane.caretForeground", red, "EditorPane.caretForeground", red,
"EditorPane.caretBlinkRate", new Integer(500), "EditorPane.caretBlinkRate", Integer.valueOf(500),
"EditorPane.inactiveForeground", table.get("textInactiveText"), "EditorPane.inactiveForeground", table.get("textInactiveText"),
"EditorPane.selectionBackground", lightGray, "EditorPane.selectionBackground", lightGray,
"EditorPane.selectionForeground", table.get("textHighlightText"), "EditorPane.selectionForeground", table.get("textHighlightText"),
......
...@@ -299,9 +299,9 @@ public class WindowsLookAndFeel extends BasicLookAndFeel ...@@ -299,9 +299,9 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
initResourceBundle(table); initResourceBundle(table);
// *** Shared Fonts // *** Shared Fonts
Integer twelve = new Integer(12); Integer twelve = Integer.valueOf(12);
Integer fontPlain = new Integer(Font.PLAIN); Integer fontPlain = Integer.valueOf(Font.PLAIN);
Integer fontBold = new Integer(Font.BOLD); Integer fontBold = Integer.valueOf(Font.BOLD);
Object dialogPlain12 = new SwingLazyValue( Object dialogPlain12 = new SwingLazyValue(
"javax.swing.plaf.FontUIResource", "javax.swing.plaf.FontUIResource",
...@@ -522,19 +522,19 @@ public class WindowsLookAndFeel extends BasicLookAndFeel ...@@ -522,19 +522,19 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
toolkit); toolkit);
Object WindowBorderWidth = new DesktopProperty( Object WindowBorderWidth = new DesktopProperty(
"win.frame.sizingBorderWidth", "win.frame.sizingBorderWidth",
new Integer(1), Integer.valueOf(1),
toolkit); toolkit);
Object TitlePaneHeight = new DesktopProperty( Object TitlePaneHeight = new DesktopProperty(
"win.frame.captionHeight", "win.frame.captionHeight",
new Integer(18), Integer.valueOf(18),
toolkit); toolkit);
Object TitleButtonWidth = new DesktopProperty( Object TitleButtonWidth = new DesktopProperty(
"win.frame.captionButtonWidth", "win.frame.captionButtonWidth",
new Integer(16), Integer.valueOf(16),
toolkit); toolkit);
Object TitleButtonHeight = new DesktopProperty( Object TitleButtonHeight = new DesktopProperty(
"win.frame.captionButtonHeight", "win.frame.captionButtonHeight",
new Integer(16), Integer.valueOf(16),
toolkit); toolkit);
Object InactiveTextColor = new DesktopProperty( Object InactiveTextColor = new DesktopProperty(
"win.text.grayedTextColor", "win.text.grayedTextColor",
...@@ -567,7 +567,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel ...@@ -567,7 +567,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
Object IconFont = ControlFont; Object IconFont = ControlFont;
Object scrollBarWidth = new DesktopProperty("win.scrollbar.width", Object scrollBarWidth = new DesktopProperty("win.scrollbar.width",
new Integer(16), toolkit); Integer.valueOf(16), toolkit);
Object menuBarHeight = new DesktopProperty("win.menu.height", Object menuBarHeight = new DesktopProperty("win.menu.height",
null, toolkit); null, toolkit);
...@@ -673,12 +673,12 @@ public class WindowsLookAndFeel extends BasicLookAndFeel ...@@ -673,12 +673,12 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
"Button.disabledForeground", InactiveTextColor, "Button.disabledForeground", InactiveTextColor,
"Button.disabledShadow", ControlHighlightColor, "Button.disabledShadow", ControlHighlightColor,
"Button.focus", black, "Button.focus", black,
"Button.dashedRectGapX", new XPValue(new Integer(3), new Integer(5)), "Button.dashedRectGapX", new XPValue(Integer.valueOf(3), Integer.valueOf(5)),
"Button.dashedRectGapY", new XPValue(new Integer(3), new Integer(4)), "Button.dashedRectGapY", new XPValue(Integer.valueOf(3), Integer.valueOf(4)),
"Button.dashedRectGapWidth", new XPValue(new Integer(6), new Integer(10)), "Button.dashedRectGapWidth", new XPValue(Integer.valueOf(6), Integer.valueOf(10)),
"Button.dashedRectGapHeight", new XPValue(new Integer(6), new Integer(8)), "Button.dashedRectGapHeight", new XPValue(Integer.valueOf(6), Integer.valueOf(8)),
"Button.textShiftOffset", new XPValue(new Integer(0), "Button.textShiftOffset", new XPValue(Integer.valueOf(0),
new Integer(1)), Integer.valueOf(1)),
// W2K keyboard navigation hidding. // W2K keyboard navigation hidding.
"Button.showMnemonics", showMnemonics, "Button.showMnemonics", showMnemonics,
"Button.focusInputMap", "Button.focusInputMap",
...@@ -780,7 +780,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel ...@@ -780,7 +780,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
}), }),
// DesktopIcon // DesktopIcon
"DesktopIcon.width", new Integer(160), "DesktopIcon.width", Integer.valueOf(160),
"EditorPane.font", ControlFont, "EditorPane.font", ControlFont,
"EditorPane.background", WindowBackgroundColor, "EditorPane.background", WindowBackgroundColor,
...@@ -814,9 +814,9 @@ public class WindowsLookAndFeel extends BasicLookAndFeel ...@@ -814,9 +814,9 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
"icons/NewFolder.gif"), "icons/NewFolder.gif"),
"FileChooser.useSystemExtensionHiding", Boolean.TRUE, "FileChooser.useSystemExtensionHiding", Boolean.TRUE,
"FileChooser.lookInLabelMnemonic", new Integer(KeyEvent.VK_I), "FileChooser.lookInLabelMnemonic", Integer.valueOf(KeyEvent.VK_I),
"FileChooser.fileNameLabelMnemonic", new Integer(KeyEvent.VK_N), "FileChooser.fileNameLabelMnemonic", Integer.valueOf(KeyEvent.VK_N),
"FileChooser.filesOfTypeLabelMnemonic", new Integer(KeyEvent.VK_T), "FileChooser.filesOfTypeLabelMnemonic", Integer.valueOf(KeyEvent.VK_T),
"FileChooser.usesSingleFilePane", Boolean.TRUE, "FileChooser.usesSingleFilePane", Boolean.TRUE,
"FileChooser.noPlacesBar", new DesktopProperty("win.comdlg.noPlacesBar", "FileChooser.noPlacesBar", new DesktopProperty("win.comdlg.noPlacesBar",
Boolean.FALSE, toolkit), Boolean.FALSE, toolkit),
...@@ -1021,10 +1021,10 @@ public class WindowsLookAndFeel extends BasicLookAndFeel ...@@ -1021,10 +1021,10 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
"Menu.selectionBackground", SelectionBackgroundColor, "Menu.selectionBackground", SelectionBackgroundColor,
"Menu.acceleratorForeground", MenuTextColor, "Menu.acceleratorForeground", MenuTextColor,
"Menu.acceleratorSelectionForeground", SelectionTextColor, "Menu.acceleratorSelectionForeground", SelectionTextColor,
"Menu.menuPopupOffsetX", new Integer(0), "Menu.menuPopupOffsetX", Integer.valueOf(0),
"Menu.menuPopupOffsetY", new Integer(0), "Menu.menuPopupOffsetY", Integer.valueOf(0),
"Menu.submenuPopupOffsetX", new Integer(-4), "Menu.submenuPopupOffsetX", Integer.valueOf(-4),
"Menu.submenuPopupOffsetY", new Integer(-3), "Menu.submenuPopupOffsetY", Integer.valueOf(-3),
"Menu.crossMenuMnemonic", Boolean.FALSE, "Menu.crossMenuMnemonic", Boolean.FALSE,
"Menu.preserveTopLevelSelection", Boolean.TRUE, "Menu.preserveTopLevelSelection", Boolean.TRUE,
...@@ -1184,8 +1184,8 @@ public class WindowsLookAndFeel extends BasicLookAndFeel ...@@ -1184,8 +1184,8 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
"ProgressBar.highlight", ControlHighlightColor, "ProgressBar.highlight", ControlHighlightColor,
"ProgressBar.selectionForeground", ControlBackgroundColor, "ProgressBar.selectionForeground", ControlBackgroundColor,
"ProgressBar.selectionBackground", SelectionBackgroundColor, "ProgressBar.selectionBackground", SelectionBackgroundColor,
"ProgressBar.cellLength", new Integer(7), "ProgressBar.cellLength", Integer.valueOf(7),
"ProgressBar.cellSpacing", new Integer(2), "ProgressBar.cellSpacing", Integer.valueOf(2),
"ProgressBar.indeterminateInsets", new Insets(3, 3, 3, 3), "ProgressBar.indeterminateInsets", new Insets(3, 3, 3, 3),
// *** RootPane. // *** RootPane.
...@@ -1292,7 +1292,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel ...@@ -1292,7 +1292,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
"SplitPane.highlight", ControlHighlightColor, "SplitPane.highlight", ControlHighlightColor,
"SplitPane.shadow", ControlShadowColor, "SplitPane.shadow", ControlShadowColor,
"SplitPane.darkShadow", ControlDarkShadowColor, "SplitPane.darkShadow", ControlDarkShadowColor,
"SplitPane.dividerSize", new Integer(5), "SplitPane.dividerSize", Integer.valueOf(5),
"SplitPane.ancestorInputMap", "SplitPane.ancestorInputMap",
new UIDefaults.LazyInputMap(new Object[] { new UIDefaults.LazyInputMap(new Object[] {
"UP", "negativeIncrement", "UP", "negativeIncrement",
...@@ -1496,7 +1496,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel ...@@ -1496,7 +1496,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
"ToggleButton.light", ControlLightColor, "ToggleButton.light", ControlLightColor,
"ToggleButton.highlight", ControlHighlightColor, "ToggleButton.highlight", ControlHighlightColor,
"ToggleButton.focus", ControlTextColor, "ToggleButton.focus", ControlTextColor,
"ToggleButton.textShiftOffset", new Integer(1), "ToggleButton.textShiftOffset", Integer.valueOf(1),
"ToggleButton.focusInputMap", "ToggleButton.focusInputMap",
new UIDefaults.LazyInputMap(new Object[] { new UIDefaults.LazyInputMap(new Object[] {
"SPACE", "pressed", "SPACE", "pressed",
...@@ -1548,8 +1548,8 @@ public class WindowsLookAndFeel extends BasicLookAndFeel ...@@ -1548,8 +1548,8 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
"Tree.background", WindowBackgroundColor, "Tree.background", WindowBackgroundColor,
"Tree.foreground", WindowTextColor, "Tree.foreground", WindowTextColor,
"Tree.hash", gray, "Tree.hash", gray,
"Tree.leftChildIndent", new Integer(8), "Tree.leftChildIndent", Integer.valueOf(8),
"Tree.rightChildIndent", new Integer(11), "Tree.rightChildIndent", Integer.valueOf(11),
"Tree.textForeground", WindowTextColor, "Tree.textForeground", WindowTextColor,
"Tree.textBackground", WindowBackgroundColor, "Tree.textBackground", WindowBackgroundColor,
"Tree.selectionForeground", SelectionTextColor, "Tree.selectionForeground", SelectionTextColor,
...@@ -2488,18 +2488,18 @@ public class WindowsLookAndFeel extends BasicLookAndFeel ...@@ -2488,18 +2488,18 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
private int direction; private int direction;
XPDLUValue(int xpdlu, int classicdlu, int direction) { XPDLUValue(int xpdlu, int classicdlu, int direction) {
super(new Integer(xpdlu), new Integer(classicdlu)); super(Integer.valueOf(xpdlu), Integer.valueOf(classicdlu));
this.direction = direction; this.direction = direction;
} }
public Object getXPValue(UIDefaults table) { public Object getXPValue(UIDefaults table) {
int px = dluToPixels(((Integer)xpValue).intValue(), direction); int px = dluToPixels(((Integer)xpValue).intValue(), direction);
return new Integer(px); return Integer.valueOf(px);
} }
public Object getClassicValue(UIDefaults table) { public Object getClassicValue(UIDefaults table) {
int px = dluToPixels(((Integer)classicValue).intValue(), direction); int px = dluToPixels(((Integer)classicValue).intValue(), direction);
return new Integer(px); return Integer.valueOf(px);
} }
} }
......
...@@ -597,7 +597,7 @@ public class Button extends Component implements Accessible { ...@@ -597,7 +597,7 @@ public class Button extends Component implements Accessible {
public String getAccessibleActionDescription(int i) { public String getAccessibleActionDescription(int i) {
if (i == 0) { if (i == 0) {
// [[[PENDING: WDW -- need to provide a localized string]]] // [[[PENDING: WDW -- need to provide a localized string]]]
return new String("click"); return "click";
} else { } else {
return null; return null;
} }
......
...@@ -847,7 +847,7 @@ public class MenuItem extends MenuComponent implements Accessible { ...@@ -847,7 +847,7 @@ public class MenuItem extends MenuComponent implements Accessible {
public String getAccessibleActionDescription(int i) { public String getAccessibleActionDescription(int i) {
if (i == 0) { if (i == 0) {
// [[[PENDING: WDW -- need to provide a localized string]]] // [[[PENDING: WDW -- need to provide a localized string]]]
return new String("click"); return "click";
} else { } else {
return null; return null;
} }
......
...@@ -298,7 +298,7 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { ...@@ -298,7 +298,7 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable {
while (continueLine(line)) { while (continueLine(line)) {
String nextLine = in.readLine(); String nextLine = in.readLine();
if (nextLine == null) { if (nextLine == null) {
nextLine = new String(""); nextLine = "";
} }
String loppedLine = String loppedLine =
line.substring(0, line.length() - 1); line.substring(0, line.length() - 1);
...@@ -313,7 +313,7 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { ...@@ -313,7 +313,7 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable {
} }
nextLine = nextLine.substring(startIndex, nextLine = nextLine.substring(startIndex,
nextLine.length()); nextLine.length());
line = new String(loppedLine+nextLine); line = loppedLine+nextLine;
} }
// Find start of key // Find start of key
......
...@@ -1210,9 +1210,9 @@ public class BufferedImage extends java.awt.Image ...@@ -1210,9 +1210,9 @@ public class BufferedImage extends java.awt.Image
* <code>BufferedImage</code>. * <code>BufferedImage</code>.
*/ */
public String toString() { public String toString() {
return new String("BufferedImage@"+Integer.toHexString(hashCode()) return "BufferedImage@"+Integer.toHexString(hashCode())
+": type = "+imageType +": type = "+imageType
+" "+colorModel+" "+raster); +" "+colorModel+" "+raster;
} }
/** /**
......
...@@ -384,7 +384,7 @@ class DictionaryBasedBreakIterator extends RuleBasedBreakIterator { ...@@ -384,7 +384,7 @@ class DictionaryBasedBreakIterator extends RuleBasedBreakIterator {
// on the last character of a legal word. Push that position onto // on the last character of a legal word. Push that position onto
// the possible-break-positions stack // the possible-break-positions stack
if (dictionary.getNextState(state, 0) == -1) { if (dictionary.getNextState(state, 0) == -1) {
possibleBreakPositions.push(new Integer(text.getIndex())); possibleBreakPositions.push(Integer.valueOf(text.getIndex()));
} }
// look up the new state to transition to in the dictionary // look up the new state to transition to in the dictionary
...@@ -395,7 +395,7 @@ class DictionaryBasedBreakIterator extends RuleBasedBreakIterator { ...@@ -395,7 +395,7 @@ class DictionaryBasedBreakIterator extends RuleBasedBreakIterator {
// and we've successfully traversed the whole range. Drop out // and we've successfully traversed the whole range. Drop out
// of the loop. // of the loop.
if (state == -1) { if (state == -1) {
currentBreakPositions.push(new Integer(text.getIndex())); currentBreakPositions.push(Integer.valueOf(text.getIndex()));
break; break;
} }
...@@ -496,7 +496,7 @@ class DictionaryBasedBreakIterator extends RuleBasedBreakIterator { ...@@ -496,7 +496,7 @@ class DictionaryBasedBreakIterator extends RuleBasedBreakIterator {
if (!currentBreakPositions.isEmpty()) { if (!currentBreakPositions.isEmpty()) {
currentBreakPositions.pop(); currentBreakPositions.pop();
} }
currentBreakPositions.push(new Integer(endPos)); currentBreakPositions.push(Integer.valueOf(endPos));
// create a regular array to hold the break positions and copy // create a regular array to hold the break positions and copy
// the break positions from the stack to the array (in addition, // the break positions from the stack to the array (in addition,
......
...@@ -1286,7 +1286,7 @@ public class MessageFormat extends Format { ...@@ -1286,7 +1286,7 @@ public class MessageFormat extends Format {
characterIterators.add( characterIterators.add(
createAttributedCharacterIterator( createAttributedCharacterIterator(
subIterator, Field.ARGUMENT, subIterator, Field.ARGUMENT,
new Integer(argumentNumber))); Integer.valueOf(argumentNumber)));
last = result.length(); last = result.length();
} }
arg = null; arg = null;
...@@ -1296,7 +1296,7 @@ public class MessageFormat extends Format { ...@@ -1296,7 +1296,7 @@ public class MessageFormat extends Format {
characterIterators.add( characterIterators.add(
createAttributedCharacterIterator( createAttributedCharacterIterator(
arg, Field.ARGUMENT, arg, Field.ARGUMENT,
new Integer(argumentNumber))); Integer.valueOf(argumentNumber)));
last = result.length(); last = result.length();
} }
} }
......
...@@ -778,8 +778,8 @@ public abstract class ImageInputStreamImpl implements ImageInputStream { ...@@ -778,8 +778,8 @@ public abstract class ImageInputStreamImpl implements ImageInputStream {
*/ */
public void mark() { public void mark() {
try { try {
markByteStack.push(new Long(getStreamPosition())); markByteStack.push(Long.valueOf(getStreamPosition()));
markBitStack.push(new Integer(getBitOffset())); markBitStack.push(Integer.valueOf(getBitOffset()));
} catch (IOException e) { } catch (IOException e) {
} }
} }
......
...@@ -2047,14 +2047,14 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl ...@@ -2047,14 +2047,14 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
null, AccessibleState.SELECTED); null, AccessibleState.SELECTED);
accessibleContext.firePropertyChange( accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
new Integer(0), new Integer(1)); Integer.valueOf(0), Integer.valueOf(1));
} else { } else {
accessibleContext.firePropertyChange( accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_STATE_PROPERTY, AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
AccessibleState.SELECTED, null); AccessibleState.SELECTED, null);
accessibleContext.firePropertyChange( accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
new Integer(1), new Integer(0)); Integer.valueOf(1), Integer.valueOf(0));
} }
} }
} }
...@@ -2552,9 +2552,9 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl ...@@ -2552,9 +2552,9 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
*/ */
public Number getCurrentAccessibleValue() { public Number getCurrentAccessibleValue() {
if (isSelected()) { if (isSelected()) {
return new Integer(1); return Integer.valueOf(1);
} else { } else {
return new Integer(0); return Integer.valueOf(0);
} }
} }
...@@ -2583,7 +2583,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl ...@@ -2583,7 +2583,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
* @return an Integer of 0. * @return an Integer of 0.
*/ */
public Number getMinimumAccessibleValue() { public Number getMinimumAccessibleValue() {
return new Integer(0); return Integer.valueOf(0);
} }
/** /**
...@@ -2592,7 +2592,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl ...@@ -2592,7 +2592,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
* @return An Integer of 1. * @return An Integer of 1.
*/ */
public Number getMaximumAccessibleValue() { public Number getMaximumAccessibleValue() {
return new Integer(1); return Integer.valueOf(1);
} }
......
...@@ -49,7 +49,7 @@ class DebugGraphicsInfo { ...@@ -49,7 +49,7 @@ class DebugGraphicsInfo {
componentToDebug = new Hashtable(); componentToDebug = new Hashtable();
} }
if (debug > 0) { if (debug > 0) {
componentToDebug.put(component, new Integer(debug)); componentToDebug.put(component, Integer.valueOf(debug));
} else { } else {
componentToDebug.remove(component); componentToDebug.remove(component);
} }
......
...@@ -1285,7 +1285,7 @@ public class JInternalFrame extends JComponent implements ...@@ -1285,7 +1285,7 @@ public class JInternalFrame extends JComponent implements
* description: Specifies what desktop layer is used. * description: Specifies what desktop layer is used.
*/ */
public void setLayer(int layer) { public void setLayer(int layer) {
this.setLayer(new Integer(layer)); this.setLayer(Integer.valueOf(layer));
} }
/** /**
...@@ -2092,7 +2092,7 @@ public class JInternalFrame extends JComponent implements ...@@ -2092,7 +2092,7 @@ public class JInternalFrame extends JComponent implements
* have a value * have a value
*/ */
public Number getCurrentAccessibleValue() { public Number getCurrentAccessibleValue() {
return new Integer(getLayer()); return Integer.valueOf(getLayer());
} }
/** /**
...@@ -2116,7 +2116,7 @@ public class JInternalFrame extends JComponent implements ...@@ -2116,7 +2116,7 @@ public class JInternalFrame extends JComponent implements
* have a minimum value * have a minimum value
*/ */
public Number getMinimumAccessibleValue() { public Number getMinimumAccessibleValue() {
return new Integer(Integer.MIN_VALUE); return Integer.MIN_VALUE;
} }
/** /**
...@@ -2126,7 +2126,7 @@ public class JInternalFrame extends JComponent implements ...@@ -2126,7 +2126,7 @@ public class JInternalFrame extends JComponent implements
* have a maximum value * have a maximum value
*/ */
public Number getMaximumAccessibleValue() { public Number getMaximumAccessibleValue() {
return new Integer(Integer.MAX_VALUE); return Integer.MAX_VALUE;
} }
} // AccessibleJInternalFrame } // AccessibleJInternalFrame
......
...@@ -1512,7 +1512,7 @@ public class JOptionPane extends JComponent implements Accessible ...@@ -1512,7 +1512,7 @@ public class JOptionPane extends JComponent implements Accessible
iFrame.putClientProperty("JInternalFrame.frameType", "optionDialog"); iFrame.putClientProperty("JInternalFrame.frameType", "optionDialog");
iFrame.putClientProperty("JInternalFrame.messageType", iFrame.putClientProperty("JInternalFrame.messageType",
new Integer(getMessageType())); Integer.valueOf(getMessageType()));
iFrame.addInternalFrameListener(new InternalFrameAdapter() { iFrame.addInternalFrameListener(new InternalFrameAdapter() {
public void internalFrameClosing(InternalFrameEvent e) { public void internalFrameClosing(InternalFrameEvent e) {
......
...@@ -775,9 +775,9 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib ...@@ -775,9 +775,9 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib
accessibleContext.firePropertyChange( accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
(oldModel== null (oldModel== null
? null : new Integer(oldModel.getValue())), ? null : Integer.valueOf(oldModel.getValue())),
(newModel== null (newModel== null
? null : new Integer(newModel.getValue()))); ? null : Integer.valueOf(newModel.getValue())));
} }
if (model != null) { if (model != null) {
...@@ -850,8 +850,8 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib ...@@ -850,8 +850,8 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib
if (accessibleContext != null) { if (accessibleContext != null) {
accessibleContext.firePropertyChange( accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
new Integer(oldValue), Integer.valueOf(oldValue),
new Integer(brm.getValue())); Integer.valueOf(brm.getValue()));
} }
} }
...@@ -1087,7 +1087,7 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib ...@@ -1087,7 +1087,7 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib
* @return the current value of this object * @return the current value of this object
*/ */
public Number getCurrentAccessibleValue() { public Number getCurrentAccessibleValue() {
return new Integer(getValue()); return Integer.valueOf(getValue());
} }
/** /**
...@@ -1110,7 +1110,7 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib ...@@ -1110,7 +1110,7 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib
* @return the minimum value of this object * @return the minimum value of this object
*/ */
public Number getMinimumAccessibleValue() { public Number getMinimumAccessibleValue() {
return new Integer(getMinimum()); return Integer.valueOf(getMinimum());
} }
/** /**
...@@ -1120,7 +1120,7 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib ...@@ -1120,7 +1120,7 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib
*/ */
public Number getMaximumAccessibleValue() { public Number getMaximumAccessibleValue() {
// TIGER - 4422362 // TIGER - 4422362
return new Integer(model.getMaximum() - model.getExtent()); return Integer.valueOf(model.getMaximum() - model.getExtent());
} }
} // AccessibleJProgressBar } // AccessibleJProgressBar
......
...@@ -314,7 +314,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible ...@@ -314,7 +314,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
BoundedRangeModel oldModel = model; BoundedRangeModel oldModel = model;
if (model != null) { if (model != null) {
model.removeChangeListener(fwdAdjustmentEvents); model.removeChangeListener(fwdAdjustmentEvents);
oldValue = new Integer(model.getValue()); oldValue = Integer.valueOf(model.getValue());
} }
model = newModel; model = newModel;
if (model != null) { if (model != null) {
...@@ -465,8 +465,8 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible ...@@ -465,8 +465,8 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
if (accessibleContext != null) { if (accessibleContext != null) {
accessibleContext.firePropertyChange( accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
new Integer(oldValue), Integer.valueOf(oldValue),
new Integer(m.getValue())); Integer.valueOf(m.getValue()));
} }
} }
...@@ -611,8 +611,8 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible ...@@ -611,8 +611,8 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
if (accessibleContext != null) { if (accessibleContext != null) {
accessibleContext.firePropertyChange( accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
new Integer(oldValue), Integer.valueOf(oldValue),
new Integer(m.getValue())); Integer.valueOf(m.getValue()));
} }
} }
...@@ -880,7 +880,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible ...@@ -880,7 +880,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
* @return The current value of this object. * @return The current value of this object.
*/ */
public Number getCurrentAccessibleValue() { public Number getCurrentAccessibleValue() {
return new Integer(getValue()); return Integer.valueOf(getValue());
} }
/** /**
...@@ -903,7 +903,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible ...@@ -903,7 +903,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
* @return The minimum value of this object. * @return The minimum value of this object.
*/ */
public Number getMinimumAccessibleValue() { public Number getMinimumAccessibleValue() {
return new Integer(getMinimum()); return Integer.valueOf(getMinimum());
} }
/** /**
......
...@@ -485,9 +485,9 @@ public class JSlider extends JComponent implements SwingConstants, Accessible { ...@@ -485,9 +485,9 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
accessibleContext.firePropertyChange( accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
(oldModel == null (oldModel == null
? null : new Integer(oldModel.getValue())), ? null : Integer.valueOf(oldModel.getValue())),
(newModel == null (newModel == null
? null : new Integer(newModel.getValue()))); ? null : Integer.valueOf(newModel.getValue())));
} }
} }
...@@ -538,8 +538,8 @@ public class JSlider extends JComponent implements SwingConstants, Accessible { ...@@ -538,8 +538,8 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
if (accessibleContext != null) { if (accessibleContext != null) {
accessibleContext.firePropertyChange( accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
new Integer(oldValue), Integer.valueOf(oldValue),
new Integer(m.getValue())); Integer.valueOf(m.getValue()));
} }
} }
...@@ -581,7 +581,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible { ...@@ -581,7 +581,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
public void setMinimum(int minimum) { public void setMinimum(int minimum) {
int oldMin = getModel().getMinimum(); int oldMin = getModel().getMinimum();
getModel().setMinimum(minimum); getModel().setMinimum(minimum);
firePropertyChange( "minimum", new Integer( oldMin ), new Integer( minimum ) ); firePropertyChange( "minimum", Integer.valueOf( oldMin ), Integer.valueOf( minimum ) );
} }
...@@ -622,7 +622,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible { ...@@ -622,7 +622,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
public void setMaximum(int maximum) { public void setMaximum(int maximum) {
int oldMax = getModel().getMaximum(); int oldMax = getModel().getMaximum();
getModel().setMaximum(maximum); getModel().setMaximum(maximum);
firePropertyChange( "maximum", new Integer( oldMax ), new Integer( maximum ) ); firePropertyChange( "maximum", Integer.valueOf( oldMax ), Integer.valueOf( maximum ) );
} }
...@@ -989,7 +989,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible { ...@@ -989,7 +989,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
void createLabels() { void createLabels() {
for ( int labelIndex = start; labelIndex <= getMaximum(); labelIndex += increment ) { for ( int labelIndex = start; labelIndex <= getMaximum(); labelIndex += increment ) {
put( new Integer( labelIndex ), new LabelUIResource( ""+labelIndex, JLabel.CENTER ) ); put( Integer.valueOf( labelIndex ), new LabelUIResource( ""+labelIndex, JLabel.CENTER ) );
} }
} }
} }
...@@ -1463,7 +1463,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible { ...@@ -1463,7 +1463,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
* @return The current value of this object. * @return The current value of this object.
*/ */
public Number getCurrentAccessibleValue() { public Number getCurrentAccessibleValue() {
return new Integer(getValue()); return Integer.valueOf(getValue());
} }
/** /**
...@@ -1486,7 +1486,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible { ...@@ -1486,7 +1486,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
* @return The minimum value of this object. * @return The minimum value of this object.
*/ */
public Number getMinimumAccessibleValue() { public Number getMinimumAccessibleValue() {
return new Integer(getMinimum()); return Integer.valueOf(getMinimum());
} }
/** /**
...@@ -1497,7 +1497,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible { ...@@ -1497,7 +1497,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
public Number getMaximumAccessibleValue() { public Number getMaximumAccessibleValue() {
// TIGER - 4422362 // TIGER - 4422362
BoundedRangeModel model = JSlider.this.getModel(); BoundedRangeModel model = JSlider.this.getModel();
return new Integer(model.getMaximum() - model.getExtent()); return Integer.valueOf(model.getMaximum() - model.getExtent());
} }
} // AccessibleJSlider } // AccessibleJSlider
} }
...@@ -1195,7 +1195,7 @@ public class JSplitPane extends JComponent implements Accessible ...@@ -1195,7 +1195,7 @@ public class JSplitPane extends JComponent implements Accessible
* @return a localized String describing the value of this object * @return a localized String describing the value of this object
*/ */
public Number getCurrentAccessibleValue() { public Number getCurrentAccessibleValue() {
return new Integer(getDividerLocation()); return Integer.valueOf(getDividerLocation());
} }
...@@ -1220,7 +1220,7 @@ public class JSplitPane extends JComponent implements Accessible ...@@ -1220,7 +1220,7 @@ public class JSplitPane extends JComponent implements Accessible
* @return The minimum value of this object. * @return The minimum value of this object.
*/ */
public Number getMinimumAccessibleValue() { public Number getMinimumAccessibleValue() {
return new Integer(getUI().getMinimumDividerLocation( return Integer.valueOf(getUI().getMinimumDividerLocation(
JSplitPane.this)); JSplitPane.this));
} }
...@@ -1231,7 +1231,7 @@ public class JSplitPane extends JComponent implements Accessible ...@@ -1231,7 +1231,7 @@ public class JSplitPane extends JComponent implements Accessible
* @return The maximum value of this object. * @return The maximum value of this object.
*/ */
public Number getMaximumAccessibleValue() { public Number getMaximumAccessibleValue() {
return new Integer(getUI().getMaximumDividerLocation( return Integer.valueOf(getUI().getMaximumDividerLocation(
JSplitPane.this)); JSplitPane.this));
} }
......
...@@ -967,7 +967,7 @@ public class JTabbedPane extends JComponent ...@@ -967,7 +967,7 @@ public class JTabbedPane extends JComponent
// currently no IndexPropertyChangeEvent. Once // currently no IndexPropertyChangeEvent. Once
// IndexPropertyChangeEvents have been added this code should be // IndexPropertyChangeEvents have been added this code should be
// modified to use it. // modified to use it.
putClientProperty("__index_to_remove__", new Integer(index)); putClientProperty("__index_to_remove__", Integer.valueOf(index));
/* if the selected tab is after the removal */ /* if the selected tab is after the removal */
if (selected > index) { if (selected > index) {
......
...@@ -7680,7 +7680,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable ...@@ -7680,7 +7680,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
*/ */
public Accessible getAccessibleRowDescription(int r) { public Accessible getAccessibleRowDescription(int r) {
if (r < 0 || r >= getAccessibleRowCount()) { if (r < 0 || r >= getAccessibleRowCount()) {
throw new IllegalArgumentException(new Integer(r).toString()); throw new IllegalArgumentException(Integer.toString(r));
} }
if (rowDescription == null) { if (rowDescription == null) {
return null; return null;
...@@ -7698,7 +7698,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable ...@@ -7698,7 +7698,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
*/ */
public void setAccessibleRowDescription(int r, Accessible a) { public void setAccessibleRowDescription(int r, Accessible a) {
if (r < 0 || r >= getAccessibleRowCount()) { if (r < 0 || r >= getAccessibleRowCount()) {
throw new IllegalArgumentException(new Integer(r).toString()); throw new IllegalArgumentException(Integer.toString(r));
} }
if (rowDescription == null) { if (rowDescription == null) {
int numRows = getAccessibleRowCount(); int numRows = getAccessibleRowCount();
...@@ -7716,7 +7716,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable ...@@ -7716,7 +7716,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
*/ */
public Accessible getAccessibleColumnDescription(int c) { public Accessible getAccessibleColumnDescription(int c) {
if (c < 0 || c >= getAccessibleColumnCount()) { if (c < 0 || c >= getAccessibleColumnCount()) {
throw new IllegalArgumentException(new Integer(c).toString()); throw new IllegalArgumentException(Integer.toString(c));
} }
if (columnDescription == null) { if (columnDescription == null) {
return null; return null;
...@@ -7734,7 +7734,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable ...@@ -7734,7 +7734,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
*/ */
public void setAccessibleColumnDescription(int c, Accessible a) { public void setAccessibleColumnDescription(int c, Accessible a) {
if (c < 0 || c >= getAccessibleColumnCount()) { if (c < 0 || c >= getAccessibleColumnCount()) {
throw new IllegalArgumentException(new Integer(c).toString()); throw new IllegalArgumentException(Integer.toString(c));
} }
if (columnDescription == null) { if (columnDescription == null) {
int numColumns = getAccessibleColumnCount(); int numColumns = getAccessibleColumnCount();
......
...@@ -267,7 +267,7 @@ public class JTextArea extends JTextComponent { ...@@ -267,7 +267,7 @@ public class JTextArea extends JTextComponent {
Document doc = getDocument(); Document doc = getDocument();
if (doc != null) { if (doc != null) {
int old = getTabSize(); int old = getTabSize();
doc.putProperty(PlainDocument.tabSizeAttribute, new Integer(size)); doc.putProperty(PlainDocument.tabSizeAttribute, Integer.valueOf(size));
firePropertyChange("tabSize", old, size); firePropertyChange("tabSize", old, size);
} }
} }
......
...@@ -144,7 +144,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel implements Serializ ...@@ -144,7 +144,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel implements Serializ
* <code>minimum &lt;= value &lt;= maximum</code> * <code>minimum &lt;= value &lt;= maximum</code>
*/ */
public SpinnerNumberModel(int value, int minimum, int maximum, int stepSize) { public SpinnerNumberModel(int value, int minimum, int maximum, int stepSize) {
this(new Integer(value), new Integer(minimum), new Integer(maximum), new Integer(stepSize)); this(Integer.valueOf(value), Integer.valueOf(minimum), Integer.valueOf(maximum), Integer.valueOf(stepSize));
} }
...@@ -171,7 +171,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel implements Serializ ...@@ -171,7 +171,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel implements Serializ
* <code>stepSize</code> equal to one, and an initial value of zero. * <code>stepSize</code> equal to one, and an initial value of zero.
*/ */
public SpinnerNumberModel() { public SpinnerNumberModel() {
this(new Integer(0), null, null, new Integer(1)); this(Integer.valueOf(0), null, null, Integer.valueOf(1));
} }
...@@ -333,16 +333,16 @@ public class SpinnerNumberModel extends AbstractSpinnerModel implements Serializ ...@@ -333,16 +333,16 @@ public class SpinnerNumberModel extends AbstractSpinnerModel implements Serializ
long v = value.longValue() + (stepSize.longValue() * (long)dir); long v = value.longValue() + (stepSize.longValue() * (long)dir);
if (value instanceof Long) { if (value instanceof Long) {
newValue = new Long(v); newValue = Long.valueOf(v);
} }
else if (value instanceof Integer) { else if (value instanceof Integer) {
newValue = new Integer((int)v); newValue = Integer.valueOf((int)v);
} }
else if (value instanceof Short) { else if (value instanceof Short) {
newValue = new Short((short)v); newValue = Short.valueOf((short)v);
} }
else { else {
newValue = new Byte((byte)v); newValue = Byte.valueOf((byte)v);
} }
} }
......
...@@ -215,7 +215,7 @@ class TablePrintable implements Printable { ...@@ -215,7 +215,7 @@ class TablePrintable implements Printable {
} }
// to pass the page number when formatting the header and footer text // to pass the page number when formatting the header and footer text
Object[] pageNumber = new Object[]{new Integer(pageIndex + 1)}; Object[] pageNumber = new Object[]{Integer.valueOf(pageIndex + 1)};
// fetch the formatted header text, if any // fetch the formatted header text, if any
String headerText = null; String headerText = null;
......
...@@ -109,7 +109,7 @@ public class BasicButtonUI extends ButtonUI{ ...@@ -109,7 +109,7 @@ public class BasicButtonUI extends ButtonUI{
LookAndFeel.installProperty(b, "rolloverEnabled", rollover); LookAndFeel.installProperty(b, "rolloverEnabled", rollover);
} }
LookAndFeel.installProperty(b, "iconTextGap", new Integer(4)); LookAndFeel.installProperty(b, "iconTextGap", Integer.valueOf(4));
} }
protected void installListeners(AbstractButton b) { protected void installListeners(AbstractButton b) {
......
...@@ -654,7 +654,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab ...@@ -654,7 +654,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
"javax.swing.plaf.basic.BasicIconFactory", "javax.swing.plaf.basic.BasicIconFactory",
"getRadioButtonMenuItemIcon"); "getRadioButtonMenuItemIcon");
Object menuItemAcceleratorDelimiter = new String("+"); Object menuItemAcceleratorDelimiter = "+";
// *** OptionPane value objects // *** OptionPane value objects
......
...@@ -146,7 +146,7 @@ public class BasicMenuItemUI extends MenuItemUI ...@@ -146,7 +146,7 @@ public class BasicMenuItemUI extends MenuItemUI
menuItem.setMargin(UIManager.getInsets(prefix + ".margin")); menuItem.setMargin(UIManager.getInsets(prefix + ".margin"));
} }
LookAndFeel.installProperty(menuItem, "iconTextGap", new Integer(4)); LookAndFeel.installProperty(menuItem, "iconTextGap", Integer.valueOf(4));
defaultTextIconGap = menuItem.getIconTextGap(); defaultTextIconGap = menuItem.getIconTextGap();
LookAndFeel.installBorder(menuItem, prefix + ".border"); LookAndFeel.installBorder(menuItem, prefix + ".border");
......
...@@ -1195,10 +1195,10 @@ public class BasicOptionPaneUI extends OptionPaneUI { ...@@ -1195,10 +1195,10 @@ public class BasicOptionPaneUI extends OptionPaneUI {
if (options == null) { if (options == null) {
if (optionType == JOptionPane.OK_CANCEL_OPTION && if (optionType == JOptionPane.OK_CANCEL_OPTION &&
buttonIndex == 1) { buttonIndex == 1) {
optionPane.setValue(new Integer(2)); optionPane.setValue(Integer.valueOf(2));
} else { } else {
optionPane.setValue(new Integer(buttonIndex)); optionPane.setValue(Integer.valueOf(buttonIndex));
} }
} else { } else {
optionPane.setValue(options[buttonIndex]); optionPane.setValue(options[buttonIndex]);
...@@ -1393,7 +1393,7 @@ public class BasicOptionPaneUI extends OptionPaneUI { ...@@ -1393,7 +1393,7 @@ public class BasicOptionPaneUI extends OptionPaneUI {
if (getName() == CLOSE) { if (getName() == CLOSE) {
JOptionPane optionPane = (JOptionPane)e.getSource(); JOptionPane optionPane = (JOptionPane)e.getSource();
optionPane.setValue(new Integer(JOptionPane.CLOSED_OPTION)); optionPane.setValue(Integer.valueOf(JOptionPane.CLOSED_OPTION));
} }
} }
} }
......
...@@ -539,7 +539,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants { ...@@ -539,7 +539,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
} }
mnemonicInputMap.put(KeyStroke.getKeyStroke(mnemonic, Event.ALT_MASK), mnemonicInputMap.put(KeyStroke.getKeyStroke(mnemonic, Event.ALT_MASK),
"setSelectedIndex"); "setSelectedIndex");
mnemonicToIndexMap.put(new Integer(mnemonic), new Integer(index)); mnemonicToIndexMap.put(Integer.valueOf(mnemonic), Integer.valueOf(index));
} }
/** /**
...@@ -2231,7 +2231,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants { ...@@ -2231,7 +2231,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
mnemonic -= ('a' - 'A'); mnemonic -= ('a' - 'A');
} }
Integer index = (Integer)ui.mnemonicToIndexMap. Integer index = (Integer)ui.mnemonicToIndexMap.
get(new Integer(mnemonic)); get(Integer.valueOf(mnemonic));
if (index != null && pane.isEnabledAt(index.intValue())) { if (index != null && pane.isEnabledAt(index.intValue())) {
pane.setSelectedIndex(index.intValue()); pane.setSelectedIndex(index.intValue());
} }
......
...@@ -178,7 +178,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants ...@@ -178,7 +178,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
dragWindow = null; dragWindow = null;
dockingSource = null; dockingSource = null;
c.putClientProperty( FOCUSED_COMP_INDEX, new Integer( focusedCompIndex ) ); c.putClientProperty( FOCUSED_COMP_INDEX, Integer.valueOf( focusedCompIndex ) );
} }
protected void installDefaults( ) protected void installDefaults( )
......
...@@ -455,7 +455,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel ...@@ -455,7 +455,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0); Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0);
Integer zero = new Integer(0); Integer zero = Integer.valueOf(0);
Object textFieldBorder = Object textFieldBorder =
new SwingLazyValue("javax.swing.plaf.metal.MetalBorders", new SwingLazyValue("javax.swing.plaf.metal.MetalBorders",
...@@ -904,7 +904,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel ...@@ -904,7 +904,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"ProgressBar.selectionBackground", primaryControlDarkShadow, "ProgressBar.selectionBackground", primaryControlDarkShadow,
"ProgressBar.border", progressBarBorder, "ProgressBar.border", progressBarBorder,
"ProgressBar.cellSpacing", zero, "ProgressBar.cellSpacing", zero,
"ProgressBar.cellLength", new Integer(1), "ProgressBar.cellLength", Integer.valueOf(1),
// Combo Box // Combo Box
"ComboBox.background", control, "ComboBox.background", control,
...@@ -971,7 +971,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel ...@@ -971,7 +971,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"DesktopIcon.font", controlTextValue, "DesktopIcon.font", controlTextValue,
"DesktopIcon.foreground", controlTextColor, "DesktopIcon.foreground", controlTextColor,
"DesktopIcon.background", control, "DesktopIcon.background", control,
"DesktopIcon.width", new Integer(160), "DesktopIcon.width", Integer.valueOf(160),
"Desktop.ancestorInputMap", "Desktop.ancestorInputMap",
new UIDefaults.LazyInputMap(new Object[] { new UIDefaults.LazyInputMap(new Object[] {
......
...@@ -53,7 +53,7 @@ class SynthArrowButton extends JButton implements SwingConstants, UIResource { ...@@ -53,7 +53,7 @@ class SynthArrowButton extends JButton implements SwingConstants, UIResource {
public void setDirection(int dir) { public void setDirection(int dir) {
direction = dir; direction = dir;
putClientProperty("__arrow_direction__", new Integer(dir)); putClientProperty("__arrow_direction__", Integer.valueOf(dir));
repaint(); repaint();
} }
......
...@@ -96,7 +96,7 @@ class SynthDesktopPaneUI extends BasicDesktopPaneUI implements ...@@ -96,7 +96,7 @@ class SynthDesktopPaneUI extends BasicDesktopPaneUI implements
} }
taskBar.setBackground(desktop.getBackground()); taskBar.setBackground(desktop.getBackground());
desktop.add(taskBar, desktop.add(taskBar,
new Integer(JLayeredPane.PALETTE_LAYER.intValue() + 1)); Integer.valueOf(JLayeredPane.PALETTE_LAYER.intValue() + 1));
if (desktop.isShowing()) { if (desktop.isShowing()) {
taskBar.adjustSize(); taskBar.adjustSize();
} }
......
...@@ -127,7 +127,7 @@ class SynthSplitPaneUI extends BasicSplitPaneUI implements ...@@ -127,7 +127,7 @@ class SynthSplitPaneUI extends BasicSplitPaneUI implements
if (style != oldStyle) { if (style != oldStyle) {
Object value = style.get(context, "SplitPane.size"); Object value = style.get(context, "SplitPane.size");
if (value == null) { if (value == null) {
value = new Integer(6); value = Integer.valueOf(6);
} }
LookAndFeel.installProperty(splitPane, "dividerSize", value); LookAndFeel.installProperty(splitPane, "dividerSize", value);
......
...@@ -281,7 +281,7 @@ public class TableColumn extends Object implements Serializable { ...@@ -281,7 +281,7 @@ public class TableColumn extends Object implements Serializable {
private void firePropertyChange(String propertyName, int oldValue, int newValue) { private void firePropertyChange(String propertyName, int oldValue, int newValue) {
if (oldValue != newValue) { if (oldValue != newValue) {
firePropertyChange(propertyName, new Integer(oldValue), new Integer(newValue)); firePropertyChange(propertyName, Integer.valueOf(oldValue), Integer.valueOf(newValue));
} }
} }
......
...@@ -351,7 +351,7 @@ public abstract class AbstractDocument implements Document, Serializable { ...@@ -351,7 +351,7 @@ public abstract class AbstractDocument implements Document, Serializable {
* loaded asynchronously * loaded asynchronously
*/ */
public void setAsynchronousLoadPriority(int p) { public void setAsynchronousLoadPriority(int p) {
Integer loadPriority = (p >= 0) ? new Integer(p) : null; Integer loadPriority = (p >= 0) ? Integer.valueOf(p) : null;
putProperty(AbstractDocument.AsyncLoadPriority, loadPriority); putProperty(AbstractDocument.AsyncLoadPriority, loadPriority);
} }
...@@ -2675,7 +2675,7 @@ public abstract class AbstractDocument implements Document, Serializable { ...@@ -2675,7 +2675,7 @@ public abstract class AbstractDocument implements Document, Serializable {
*/ */
BidiElement(Element parent, int start, int end, int level) { BidiElement(Element parent, int start, int end, int level) {
super(parent, new SimpleAttributeSet(), start, end); super(parent, new SimpleAttributeSet(), start, end);
addAttribute(StyleConstants.BidiLevel, new Integer(level)); addAttribute(StyleConstants.BidiLevel, Integer.valueOf(level));
//System.out.println("BidiElement: start = " + start //System.out.println("BidiElement: start = " + start
// + " end = " + end + " level = " + level ); // + " end = " + end + " level = " + level );
} }
......
...@@ -173,23 +173,24 @@ public class NumberFormatter extends InternationalFormatter { ...@@ -173,23 +173,24 @@ public class NumberFormatter extends InternationalFormatter {
*/ */
private Object convertValueToValueClass(Object value, Class valueClass) { private Object convertValueToValueClass(Object value, Class valueClass) {
if (valueClass != null && (value instanceof Number)) { if (valueClass != null && (value instanceof Number)) {
Number numberValue = (Number)value;
if (valueClass == Integer.class) { if (valueClass == Integer.class) {
return new Integer(((Number)value).intValue()); return Integer.valueOf(numberValue.intValue());
} }
else if (valueClass == Long.class) { else if (valueClass == Long.class) {
return new Long(((Number)value).longValue()); return Long.valueOf(numberValue.longValue());
} }
else if (valueClass == Float.class) { else if (valueClass == Float.class) {
return new Float(((Number)value).floatValue()); return Float.valueOf(numberValue.floatValue());
} }
else if (valueClass == Double.class) { else if (valueClass == Double.class) {
return new Double(((Number)value).doubleValue()); return Double.valueOf(numberValue.doubleValue());
} }
else if (valueClass == Byte.class) { else if (valueClass == Byte.class) {
return new Byte(((Number)value).byteValue()); return Byte.valueOf(numberValue.byteValue());
} }
else if (valueClass == Short.class) { else if (valueClass == Short.class) {
return new Short(((Number)value).shortValue()); return Short.valueOf(numberValue.shortValue());
} }
} }
return value; return value;
......
...@@ -89,7 +89,7 @@ public class PlainDocument extends AbstractDocument { ...@@ -89,7 +89,7 @@ public class PlainDocument extends AbstractDocument {
*/ */
public PlainDocument(Content c) { public PlainDocument(Content c) {
super(c); super(c);
putProperty(tabSizeAttribute, new Integer(8)); putProperty(tabSizeAttribute, Integer.valueOf(8));
defaultRoot = createDefaultRoot(); defaultRoot = createDefaultRoot();
} }
......
...@@ -118,7 +118,7 @@ public class Segment implements Cloneable, CharacterIterator, CharSequence { ...@@ -118,7 +118,7 @@ public class Segment implements Cloneable, CharacterIterator, CharSequence {
if (array != null) { if (array != null) {
return new String(array, offset, count); return new String(array, offset, count);
} }
return new String(); return "";
} }
// --- CharacterIterator methods ------------------------------------- // --- CharacterIterator methods -------------------------------------
......
...@@ -296,7 +296,7 @@ public class StyleConstants { ...@@ -296,7 +296,7 @@ public class StyleConstants {
* @param o the bidi level value * @param o the bidi level value
*/ */
public static void setBidiLevel(MutableAttributeSet a, int o) { public static void setBidiLevel(MutableAttributeSet a, int o) {
a.addAttribute(BidiLevel, new Integer(o)); a.addAttribute(BidiLevel, Integer.valueOf(o));
} }
/** /**
...@@ -386,7 +386,7 @@ public class StyleConstants { ...@@ -386,7 +386,7 @@ public class StyleConstants {
* @param s the font size * @param s the font size
*/ */
public static void setFontSize(MutableAttributeSet a, int s) { public static void setFontSize(MutableAttributeSet a, int s) {
a.addAttribute(FontSize, new Integer(s)); a.addAttribute(FontSize, Integer.valueOf(s));
} }
/** /**
...@@ -753,7 +753,7 @@ public class StyleConstants { ...@@ -753,7 +753,7 @@ public class StyleConstants {
* @param align the alignment value * @param align the alignment value
*/ */
public static void setAlignment(MutableAttributeSet a, int align) { public static void setAlignment(MutableAttributeSet a, int align) {
a.addAttribute(Alignment, new Integer(align)); a.addAttribute(Alignment, Integer.valueOf(align));
} }
/** /**
......
...@@ -1970,7 +1970,7 @@ class AccessibleHTML implements Accessible { ...@@ -1970,7 +1970,7 @@ class AccessibleHTML implements Accessible {
for (int i = 0; i < nRows; i++) { for (int i = 0; i < nRows; i++) {
if (isAccessibleRowSelected(i)) { if (isAccessibleRowSelected(i)) {
vec.addElement(new Integer(i)); vec.addElement(Integer.valueOf(i));
} }
} }
int retval[] = new int[vec.size()]; int retval[] = new int[vec.size()];
...@@ -1995,7 +1995,7 @@ class AccessibleHTML implements Accessible { ...@@ -1995,7 +1995,7 @@ class AccessibleHTML implements Accessible {
for (int i = 0; i < nColumns; i++) { for (int i = 0; i < nColumns; i++) {
if (isAccessibleColumnSelected(i)) { if (isAccessibleColumnSelected(i)) {
vec.addElement(new Integer(i)); vec.addElement(Integer.valueOf(i));
} }
} }
int retval[] = new int[vec.size()]; int retval[] = new int[vec.size()];
...@@ -2139,7 +2139,7 @@ class AccessibleHTML implements Accessible { ...@@ -2139,7 +2139,7 @@ class AccessibleHTML implements Accessible {
private int columnCount = 0; private int columnCount = 0;
public void addHeader(TableCellElementInfo cellInfo, int rowNumber) { public void addHeader(TableCellElementInfo cellInfo, int rowNumber) {
Integer rowInteger = new Integer(rowNumber); Integer rowInteger = Integer.valueOf(rowNumber);
ArrayList list = (ArrayList)headers.get(rowInteger); ArrayList list = (ArrayList)headers.get(rowInteger);
if (list == null) { if (list == null) {
list = new ArrayList(); list = new ArrayList();
...@@ -2201,7 +2201,7 @@ class AccessibleHTML implements Accessible { ...@@ -2201,7 +2201,7 @@ class AccessibleHTML implements Accessible {
} }
private TableCellElementInfo getElementInfoAt(int r, int c) { private TableCellElementInfo getElementInfoAt(int r, int c) {
ArrayList list = (ArrayList)headers.get(new Integer(r)); ArrayList list = (ArrayList)headers.get(Integer.valueOf(r));
if (list != null) { if (list != null) {
return (TableCellElementInfo)list.get(c); return (TableCellElementInfo)list.get(c);
} else { } else {
......
...@@ -1099,7 +1099,7 @@ public class CSS implements Serializable { ...@@ -1099,7 +1099,7 @@ public class CSS implements Serializable {
*/ */
static String colorToHex(Color color) { static String colorToHex(Color color) {
String colorstr = new String("#"); String colorstr = "#";
// Red // Red
String str = Integer.toHexString(color.getRed()); String str = Integer.toHexString(color.getRed());
......
...@@ -1899,8 +1899,8 @@ public class HTMLEditorKit extends StyledEditorKit implements Accessible { ...@@ -1899,8 +1899,8 @@ public class HTMLEditorKit extends StyledEditorKit implements Accessible {
// assistive technologies listening for such events. // assistive technologies listening for such events.
comp.getAccessibleContext().firePropertyChange( comp.getAccessibleContext().firePropertyChange(
AccessibleContext.ACCESSIBLE_HYPERTEXT_OFFSET, AccessibleContext.ACCESSIBLE_HYPERTEXT_OFFSET,
new Integer(kit.prevHypertextOffset), Integer.valueOf(kit.prevHypertextOffset),
new Integer(e.getDot())); Integer.valueOf(e.getDot()));
} }
} }
} }
......
...@@ -132,7 +132,7 @@ class AttributeList implements DTDConstants, Serializable { ...@@ -132,7 +132,7 @@ class AttributeList implements DTDConstants, Serializable {
static Hashtable attributeTypes = new Hashtable(); static Hashtable attributeTypes = new Hashtable();
static void defineAttributeType(String nm, int val) { static void defineAttributeType(String nm, int val) {
Integer num = new Integer(val); Integer num = Integer.valueOf(val);
attributeTypes.put(nm, num); attributeTypes.put(nm, num);
attributeTypes.put(num, nm); attributeTypes.put(num, nm);
} }
...@@ -154,11 +154,11 @@ class AttributeList implements DTDConstants, Serializable { ...@@ -154,11 +154,11 @@ class AttributeList implements DTDConstants, Serializable {
defineAttributeType("NUTOKEN", NUTOKEN); defineAttributeType("NUTOKEN", NUTOKEN);
defineAttributeType("NUTOKENS", NUTOKENS); defineAttributeType("NUTOKENS", NUTOKENS);
attributeTypes.put("fixed", new Integer(FIXED)); attributeTypes.put("fixed", Integer.valueOf(FIXED));
attributeTypes.put("required", new Integer(REQUIRED)); attributeTypes.put("required", Integer.valueOf(REQUIRED));
attributeTypes.put("current", new Integer(CURRENT)); attributeTypes.put("current", Integer.valueOf(CURRENT));
attributeTypes.put("conref", new Integer(CONREF)); attributeTypes.put("conref", Integer.valueOf(CONREF));
attributeTypes.put("implied", new Integer(IMPLIED)); attributeTypes.put("implied", Integer.valueOf(IMPLIED));
} }
public static int name2type(String nm) { public static int name2type(String nm) {
...@@ -167,6 +167,6 @@ class AttributeList implements DTDConstants, Serializable { ...@@ -167,6 +167,6 @@ class AttributeList implements DTDConstants, Serializable {
} }
public static String type2name(int tp) { public static String type2name(int tp) {
return (String)attributeTypes.get(new Integer(tp)); return (String)attributeTypes.get(Integer.valueOf(tp));
} }
} }
...@@ -113,7 +113,7 @@ class DTD implements DTDConstants { ...@@ -113,7 +113,7 @@ class DTD implements DTDConstants {
* <code>ch</code> character * <code>ch</code> character
*/ */
public Entity getEntity(int ch) { public Entity getEntity(int ch) {
return (Entity)entityHash.get(new Integer(ch)); return (Entity)entityHash.get(Integer.valueOf(ch));
} }
/** /**
...@@ -178,7 +178,7 @@ class DTD implements DTDConstants { ...@@ -178,7 +178,7 @@ class DTD implements DTDConstants {
switch (type & ~GENERAL) { switch (type & ~GENERAL) {
case CDATA: case CDATA:
case SDATA: case SDATA:
entityHash.put(new Integer(data[0]), ent); entityHash.put(Integer.valueOf(data[0]), ent);
break; break;
} }
} }
......
...@@ -162,10 +162,10 @@ class Element implements DTDConstants, Serializable { ...@@ -162,10 +162,10 @@ class Element implements DTDConstants, Serializable {
static Hashtable contentTypes = new Hashtable(); static Hashtable contentTypes = new Hashtable();
static { static {
contentTypes.put("CDATA", new Integer(CDATA)); contentTypes.put("CDATA", Integer.valueOf(CDATA));
contentTypes.put("RCDATA", new Integer(RCDATA)); contentTypes.put("RCDATA", Integer.valueOf(RCDATA));
contentTypes.put("EMPTY", new Integer(EMPTY)); contentTypes.put("EMPTY", Integer.valueOf(EMPTY));
contentTypes.put("ANY", new Integer(ANY)); contentTypes.put("ANY", Integer.valueOf(ANY));
} }
public static int name2type(String nm) { public static int name2type(String nm) {
......
...@@ -110,15 +110,15 @@ class Entity implements DTDConstants { ...@@ -110,15 +110,15 @@ class Entity implements DTDConstants {
static Hashtable entityTypes = new Hashtable(); static Hashtable entityTypes = new Hashtable();
static { static {
entityTypes.put("PUBLIC", new Integer(PUBLIC)); entityTypes.put("PUBLIC", Integer.valueOf(PUBLIC));
entityTypes.put("CDATA", new Integer(CDATA)); entityTypes.put("CDATA", Integer.valueOf(CDATA));
entityTypes.put("SDATA", new Integer(SDATA)); entityTypes.put("SDATA", Integer.valueOf(SDATA));
entityTypes.put("PI", new Integer(PI)); entityTypes.put("PI", Integer.valueOf(PI));
entityTypes.put("STARTTAG", new Integer(STARTTAG)); entityTypes.put("STARTTAG", Integer.valueOf(STARTTAG));
entityTypes.put("ENDTAG", new Integer(ENDTAG)); entityTypes.put("ENDTAG", Integer.valueOf(ENDTAG));
entityTypes.put("MS", new Integer(MS)); entityTypes.put("MS", Integer.valueOf(MS));
entityTypes.put("MD", new Integer(MD)); entityTypes.put("MD", Integer.valueOf(MD));
entityTypes.put("SYSTEM", new Integer(SYSTEM)); entityTypes.put("SYSTEM", Integer.valueOf(SYSTEM));
} }
/** /**
......
...@@ -1842,7 +1842,7 @@ class Parser implements DTDConstants { ...@@ -1842,7 +1842,7 @@ class Parser implements DTDConstants {
String elemStr = getString(0); String elemStr = getString(0);
if (elemStr.equals("image")) { if (elemStr.equals("image")) {
elemStr = new String("img"); elemStr = "img";
} }
/* determine if this element is part of the dtd. */ /* determine if this element is part of the dtd. */
......
...@@ -281,7 +281,7 @@ class RTFAttributes ...@@ -281,7 +281,7 @@ class RTFAttributes
public AssertiveAttribute(int d, Object s, String r, int v) public AssertiveAttribute(int d, Object s, String r, int v)
{ {
super(d, s, r); super(d, s, r);
swingValue = new Integer(v); swingValue = Integer.valueOf(v);
} }
public boolean set(MutableAttributeSet target) public boolean set(MutableAttributeSet target)
...@@ -343,7 +343,7 @@ class RTFAttributes ...@@ -343,7 +343,7 @@ class RTFAttributes
public NumericAttribute(int d, Object s, public NumericAttribute(int d, Object s,
String r, int ds, int dr) String r, int ds, int dr)
{ {
this(d, s, r, new Integer(ds), dr, 1f); this(d, s, r, Integer.valueOf(ds), dr, 1f);
} }
public NumericAttribute(int d, Object s, public NumericAttribute(int d, Object s,
...@@ -377,7 +377,7 @@ class RTFAttributes ...@@ -377,7 +377,7 @@ class RTFAttributes
Number swingValue; Number swingValue;
if (scale == 1f) if (scale == 1f)
swingValue = new Integer(parameter); swingValue = Integer.valueOf(parameter);
else else
swingValue = new Float(parameter / scale); swingValue = new Float(parameter / scale);
target.addAttribute(swingName, swingValue); target.addAttribute(swingName, swingValue);
......
...@@ -83,11 +83,7 @@ class RTFGenerator extends Object ...@@ -83,11 +83,7 @@ class RTFGenerator extends Object
static public final String defaultFontFamily = "Helvetica"; static public final String defaultFontFamily = "Helvetica";
/* constants so we can avoid allocating objects in inner loops */ /* constants so we can avoid allocating objects in inner loops */
/* these should all be final, but javac seems to be a bit buggy */ final static private Object MagicToken;
static protected Integer One, Zero;
static protected Boolean False;
static protected Float ZeroPointZero;
static private Object MagicToken;
/* An array of character-keyword pairs. This could be done /* An array of character-keyword pairs. This could be done
as a dictionary (and lookup would be quicker), but that as a dictionary (and lookup would be quicker), but that
...@@ -98,11 +94,7 @@ class RTFGenerator extends Object ...@@ -98,11 +94,7 @@ class RTFGenerator extends Object
static protected CharacterKeywordPair[] textKeywords; static protected CharacterKeywordPair[] textKeywords;
static { static {
One = new Integer(1);
Zero = new Integer(0);
False = Boolean.valueOf(false);
MagicToken = new Object(); MagicToken = new Object();
ZeroPointZero = new Float(0);
Dictionary textKeywordDictionary = RTFReader.textKeywords; Dictionary textKeywordDictionary = RTFReader.textKeywords;
Enumeration keys = textKeywordDictionary.keys(); Enumeration keys = textKeywordDictionary.keys();
...@@ -142,7 +134,7 @@ static public void writeDocument(Document d, OutputStream to) ...@@ -142,7 +134,7 @@ static public void writeDocument(Document d, OutputStream to)
public RTFGenerator(OutputStream to) public RTFGenerator(OutputStream to)
{ {
colorTable = new Hashtable(); colorTable = new Hashtable();
colorTable.put(defaultRTFColor, new Integer(0)); colorTable.put(defaultRTFColor, Integer.valueOf(0));
colorCount = 1; colorCount = 1;
fontTable = new Hashtable(); fontTable = new Hashtable();
...@@ -693,7 +685,7 @@ protected void resetParagraphAttributes(MutableAttributeSet currentAttributes) ...@@ -693,7 +685,7 @@ protected void resetParagraphAttributes(MutableAttributeSet currentAttributes)
{ {
writeControlWord("pard"); writeControlWord("pard");
currentAttributes.addAttribute(StyleConstants.Alignment, Zero); currentAttributes.addAttribute(StyleConstants.Alignment, Integer.valueOf(0));
int wordIndex; int wordIndex;
int wordCount = RTFAttributes.attributes.length; int wordCount = RTFAttributes.attributes.length;
......
...@@ -157,8 +157,8 @@ public class DefaultTreeSelectionModel extends Object implements Cloneable, Seri ...@@ -157,8 +157,8 @@ public class DefaultTreeSelectionModel extends Object implements Cloneable, Seri
selectionMode = TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION; selectionMode = TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION;
if(oldMode != selectionMode && changeSupport != null) if(oldMode != selectionMode && changeSupport != null)
changeSupport.firePropertyChange(SELECTION_MODE_PROPERTY, changeSupport.firePropertyChange(SELECTION_MODE_PROPERTY,
new Integer(oldMode), Integer.valueOf(oldMode),
new Integer(selectionMode)); Integer.valueOf(selectionMode));
} }
/** /**
......
...@@ -285,7 +285,7 @@ abstract class AppletPanel extends Panel implements AppletStub, Runnable { ...@@ -285,7 +285,7 @@ abstract class AppletPanel extends Panel implements AppletStub, Runnable {
//System.out.println("SEND0= " + id); //System.out.println("SEND0= " + id);
queue = new Queue(); queue = new Queue();
} }
Integer eventId = new Integer(id); Integer eventId = Integer.valueOf(id);
queue.enqueue(eventId); queue.enqueue(eventId);
notifyAll(); notifyAll();
} }
......
...@@ -587,9 +587,9 @@ public class AppletViewer extends Frame implements AppletContext, ...@@ -587,9 +587,9 @@ public class AppletViewer extends Frame implements AppletContext,
Dimension d = panel.size(); Dimension d = panel.size();
Insets in = panel.insets(); Insets in = panel.insets();
panel.atts.put("width", panel.atts.put("width",
new Integer(d.width - (in.left + in.right)).toString()); Integer.toString(d.width - (in.left + in.right)));
panel.atts.put("height", panel.atts.put("height",
new Integer(d.height - (in.top + in.bottom)).toString()); Integer.toString(d.height - (in.top + in.bottom)));
} }
/** /**
......
...@@ -1956,7 +1956,7 @@ public abstract class FontConfiguration { ...@@ -1956,7 +1956,7 @@ public abstract class FontConfiguration {
/*Init these tables to allow componentFontNameID, fontfileNameIDs /*Init these tables to allow componentFontNameID, fontfileNameIDs
to start from "1". to start from "1".
*/ */
componentFontNameIDs.put("", new Short((short)0)); componentFontNameIDs.put("", Short.valueOf((short)0));
fontfileNameIDs = new HashMap<String, Short>(); fontfileNameIDs = new HashMap<String, Short>();
filenames = new HashMap<Short, Short>(); filenames = new HashMap<Short, Short>();
......
...@@ -556,7 +556,7 @@ public class InputContext extends java.awt.im.InputContext ...@@ -556,7 +556,7 @@ public class InputContext extends java.awt.im.InputContext
} }
usedInputMethods.put(inputMethodLocator.deriveLocator(null), inputMethod); usedInputMethods.put(inputMethodLocator.deriveLocator(null), inputMethod);
perInputMethodState.put(inputMethod, perInputMethodState.put(inputMethod,
new Boolean(clientWindowNotificationEnabled)); Boolean.valueOf(clientWindowNotificationEnabled));
enableClientWindowNotification(inputMethod, false); enableClientWindowNotification(inputMethod, false);
if (this == inputMethodWindowContext) { if (this == inputMethodWindowContext) {
inputMethod.hideWindows(); inputMethod.hideWindows();
...@@ -921,7 +921,7 @@ public class InputContext extends java.awt.im.InputContext ...@@ -921,7 +921,7 @@ public class InputContext extends java.awt.im.InputContext
if (perInputMethodState == null) { if (perInputMethodState == null) {
perInputMethodState = new HashMap(5); perInputMethodState = new HashMap(5);
} }
perInputMethodState.put(requester, new Boolean(enable)); perInputMethodState.put(requester, Boolean.valueOf(enable));
return; return;
} }
......
...@@ -657,7 +657,7 @@ public class FileFontStrike extends PhysicalStrike { ...@@ -657,7 +657,7 @@ public class FileFontStrike extends PhysicalStrike {
* we first obtain this information, then the image, and never * we first obtain this information, then the image, and never
* will access this value again. * will access this value again.
*/ */
Integer key = new Integer(glyphCode); Integer key = Integer.valueOf(glyphCode);
Point2D.Float value = null; Point2D.Float value = null;
ConcurrentHashMap<Integer, Point2D.Float> glyphMetricsMap = null; ConcurrentHashMap<Integer, Point2D.Float> glyphMetricsMap = null;
if (glyphMetricsMapRef != null) { if (glyphMetricsMapRef != null) {
...@@ -724,7 +724,7 @@ public class FileFontStrike extends PhysicalStrike { ...@@ -724,7 +724,7 @@ public class FileFontStrike extends PhysicalStrike {
boundsMap = new ConcurrentHashMap<Integer, Rectangle2D.Float>(); boundsMap = new ConcurrentHashMap<Integer, Rectangle2D.Float>();
} }
Integer key = new Integer(glyphCode); Integer key = Integer.valueOf(glyphCode);
Rectangle2D.Float bounds = boundsMap.get(key); Rectangle2D.Float bounds = boundsMap.get(key);
if (bounds == null) { if (bounds == null) {
......
...@@ -2124,7 +2124,7 @@ public final class FontManager { ...@@ -2124,7 +2124,7 @@ public final class FontManager {
private static void addLCIDMapEntry(Map<String, Short> map, private static void addLCIDMapEntry(Map<String, Short> map,
String key, short value) { String key, short value) {
map.put(key, new Short(value)); map.put(key, Short.valueOf(value));
} }
private static synchronized void createLCIDMap() { private static synchronized void createLCIDMap() {
......
...@@ -117,7 +117,7 @@ public final class FontResolver { ...@@ -117,7 +117,7 @@ public final class FontResolver {
Font2D font2D = FontManager.getFont2D(font); Font2D font2D = FontManager.getFont2D(font);
if (font2D.hasSupplementaryChars()) { if (font2D.hasSupplementaryChars()) {
fonts.add(font); fonts.add(font);
indices.add(new Integer(i)); indices.add(Integer.valueOf(i));
} }
} }
......
...@@ -114,7 +114,7 @@ public abstract class PhysicalStrike extends FontStrike { ...@@ -114,7 +114,7 @@ public abstract class PhysicalStrike extends FontStrike {
*/ */
Point2D.Float getGlyphPoint(int glyphCode, int ptNumber) { Point2D.Float getGlyphPoint(int glyphCode, int ptNumber) {
Point2D.Float gp = null; Point2D.Float gp = null;
Integer ptKey = new Integer(glyphCode<<16|ptNumber); Integer ptKey = Integer.valueOf(glyphCode<<16|ptNumber);
if (glyphPointMapCache == null) { if (glyphPointMapCache == null) {
synchronized (this) { synchronized (this) {
if (glyphPointMapCache == null) { if (glyphPointMapCache == null) {
......
...@@ -1374,7 +1374,7 @@ public final class SunGraphics2D ...@@ -1374,7 +1374,7 @@ public final class SunGraphics2D
SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS, SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS,
fractionalMetricsHint)); fractionalMetricsHint));
model.put(SunHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST, model.put(SunHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST,
new Integer(lcdTextContrast)); Integer.valueOf(lcdTextContrast));
Object value; Object value;
switch (interpolationHint) { switch (interpolationHint) {
case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR: case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR:
......
...@@ -408,7 +408,7 @@ public final class SurfaceType { ...@@ -408,7 +408,7 @@ public final class SurfaceType {
if (unusedUID > 255) { if (unusedUID > 255) {
throw new InternalError("surface type id overflow"); throw new InternalError("surface type id overflow");
} }
i = new Integer(unusedUID++); i = Integer.valueOf(unusedUID++);
surfaceUIDMap.put(desc, i); surfaceUIDMap.put(desc, i);
} }
return i.intValue(); return i.intValue();
......
...@@ -1536,16 +1536,16 @@ public class PSPrinterJob extends RasterPrinterJob { ...@@ -1536,16 +1536,16 @@ public class PSPrinterJob extends RasterPrinterJob {
execCmd = new String[ncomps]; execCmd = new String[ncomps];
execCmd[n++] = "/usr/bin/lpr"; execCmd[n++] = "/usr/bin/lpr";
if ((pFlags & PRINTER) != 0) { if ((pFlags & PRINTER) != 0) {
execCmd[n++] = new String("-P" + printer); execCmd[n++] = "-P" + printer;
} }
if ((pFlags & BANNER) != 0) { if ((pFlags & BANNER) != 0) {
execCmd[n++] = new String("-J" + banner); execCmd[n++] = "-J" + banner;
} }
if ((pFlags & COPIES) != 0) { if ((pFlags & COPIES) != 0) {
execCmd[n++] = new String("-#" + new Integer(copies).toString()); execCmd[n++] = "-#" + copies;
} }
if ((pFlags & NOSHEET) != 0) { if ((pFlags & NOSHEET) != 0) {
execCmd[n++] = new String("-h"); execCmd[n++] = "-h";
} }
if ((pFlags & OPTIONS) != 0) { if ((pFlags & OPTIONS) != 0) {
execCmd[n++] = new String(options); execCmd[n++] = new String(options);
...@@ -1556,19 +1556,19 @@ public class PSPrinterJob extends RasterPrinterJob { ...@@ -1556,19 +1556,19 @@ public class PSPrinterJob extends RasterPrinterJob {
execCmd[n++] = "/usr/bin/lp"; execCmd[n++] = "/usr/bin/lp";
execCmd[n++] = "-c"; // make a copy of the spool file execCmd[n++] = "-c"; // make a copy of the spool file
if ((pFlags & PRINTER) != 0) { if ((pFlags & PRINTER) != 0) {
execCmd[n++] = new String("-d" + printer); execCmd[n++] = "-d" + printer;
} }
if ((pFlags & BANNER) != 0) { if ((pFlags & BANNER) != 0) {
execCmd[n++] = new String("-t" + banner); execCmd[n++] = "-t" + banner;
} }
if ((pFlags & COPIES) != 0) { if ((pFlags & COPIES) != 0) {
execCmd[n++] = new String("-n" + new Integer(copies).toString()); execCmd[n++] = "-n" + copies;
} }
if ((pFlags & NOSHEET) != 0) { if ((pFlags & NOSHEET) != 0) {
execCmd[n++] = new String("-o nobanner"); execCmd[n++] = "-o nobanner";
} }
if ((pFlags & OPTIONS) != 0) { if ((pFlags & OPTIONS) != 0) {
execCmd[n++] = new String("-o" + options); execCmd[n++] = "-o" + options;
} }
} }
execCmd[n++] = spoolFile; execCmd[n++] = spoolFile;
......
...@@ -245,7 +245,7 @@ public abstract class RasterPrinterJob extends PrinterJob { ...@@ -245,7 +245,7 @@ public abstract class RasterPrinterJob extends PrinterJob {
/** /**
* The name of the job being printed. * The name of the job being printed.
*/ */
private String mDocName = new String("Java Printing"); private String mDocName = "Java Printing";
/** /**
......
...@@ -116,7 +116,7 @@ public final class VersionInfo ...@@ -116,7 +116,7 @@ public final class VersionInfo
throw new IllegalArgumentException(INVALID_VERSION_NUMBER_); throw new IllegalArgumentException(INVALID_VERSION_NUMBER_);
} }
int version = getInt(major, minor, milli, micro); int version = getInt(major, minor, milli, micro);
Integer key = new Integer(version); Integer key = Integer.valueOf(version);
Object result = MAP_.get(key); Object result = MAP_.get(key);
if (result == null) { if (result == null) {
result = new VersionInfo(version); result = new VersionInfo(version);
......
...@@ -317,7 +317,7 @@ abstract class XDropTargetProtocol { ...@@ -317,7 +317,7 @@ abstract class XDropTargetProtocol {
protected final void removeEmbedderRegistryEntry(long embedder) { protected final void removeEmbedderRegistryEntry(long embedder) {
synchronized (this) { synchronized (this) {
embedderRegistry.remove(new Long(embedder)); embedderRegistry.remove(Long.valueOf(embedder));
} }
} }
} }
...@@ -329,7 +329,7 @@ final class XDropTargetRegistry { ...@@ -329,7 +329,7 @@ final class XDropTargetRegistry {
embedderProtocols = Collections.unmodifiableList(embedderProtocols); embedderProtocols = Collections.unmodifiableList(embedderProtocols);
Long lToplevel = new Long(embedder); Long lToplevel = Long.valueOf(embedder);
boolean isXEmbedServer = false; boolean isXEmbedServer = false;
synchronized (this) { synchronized (this) {
EmbeddedDropSiteEntry entry = EmbeddedDropSiteEntry entry =
......
...@@ -383,11 +383,11 @@ public class XEmbedServerTester implements XEventDispatcher { ...@@ -383,11 +383,11 @@ public class XEmbedServerTester implements XEventDispatcher {
try { try {
XCreateWindowParams params = XCreateWindowParams params =
new XCreateWindowParams(new Object[] { new XCreateWindowParams(new Object[] {
XBaseWindow.PARENT_WINDOW, new Long(reparent?XToolkit.getDefaultRootWindow():parent), XBaseWindow.PARENT_WINDOW, Long.valueOf(reparent?XToolkit.getDefaultRootWindow():parent),
XBaseWindow.BOUNDS, initialBounds, XBaseWindow.BOUNDS, initialBounds,
XBaseWindow.EMBEDDED, Boolean.TRUE, XBaseWindow.EMBEDDED, Boolean.TRUE,
XBaseWindow.VISIBLE, Boolean.valueOf(mapped == XEmbedHelper.XEMBED_MAPPED), XBaseWindow.VISIBLE, Boolean.valueOf(mapped == XEmbedHelper.XEMBED_MAPPED),
XBaseWindow.EVENT_MASK, new Long(VisibilityChangeMask | StructureNotifyMask | XBaseWindow.EVENT_MASK, Long.valueOf(VisibilityChangeMask | StructureNotifyMask |
SubstructureNotifyMask | KeyPressMask)}); SubstructureNotifyMask | KeyPressMask)});
window = new XBaseWindow(params); window = new XBaseWindow(params);
......
...@@ -908,7 +908,7 @@ class FileDialogFilter implements FilenameFilter { ...@@ -908,7 +908,7 @@ class FileDialogFilter implements FilenameFilter {
* Converts the filter into the form which is acceptable by Java's regexps * Converts the filter into the form which is acceptable by Java's regexps
*/ */
private String convert(String filter) { private String convert(String filter) {
String regex = new String("^" + filter + "$"); String regex = "^" + filter + "$";
regex = regex.replaceAll("\\.", "\\\\."); regex = regex.replaceAll("\\.", "\\\\.");
regex = regex.replaceAll("\\?", "."); regex = regex.replaceAll("\\?", ".");
regex = regex.replaceAll("\\*", ".*"); regex = regex.replaceAll("\\*", ".*");
......
...@@ -458,16 +458,16 @@ abstract class XScrollbar { ...@@ -458,16 +458,16 @@ abstract class XScrollbar {
String type; String type;
switch (id) { switch (id) {
case MouseEvent.MOUSE_PRESSED: case MouseEvent.MOUSE_PRESSED:
type = new String("press"); type = "press";
break; break;
case MouseEvent.MOUSE_RELEASED: case MouseEvent.MOUSE_RELEASED:
type = new String("release"); type = "release";
break; break;
case MouseEvent.MOUSE_DRAGGED: case MouseEvent.MOUSE_DRAGGED:
type = new String("drag"); type = "drag";
break; break;
default: default:
type = new String("other"); type = "other";
} }
log.finer("Mouse " + type + " event in scroll bar " + this + log.finer("Mouse " + type + " event in scroll bar " + this +
"x = " + x + ", y = " + y + "x = " + x + ", y = " + y +
......
...@@ -421,7 +421,7 @@ public class X11GraphicsConfig extends GraphicsConfiguration ...@@ -421,7 +421,7 @@ public class X11GraphicsConfig extends GraphicsConfiguration
{ {
return new SunVolatileImage(target, return new SunVolatileImage(target,
target.getWidth(), target.getHeight(), target.getWidth(), target.getHeight(),
new Long(backBuffer)); Long.valueOf(backBuffer));
} }
/** /**
......
...@@ -164,7 +164,7 @@ public class X11GraphicsDevice ...@@ -164,7 +164,7 @@ public class X11GraphicsDevice
if (ret[i] == null) { if (ret[i] == null) {
boolean doubleBuffer = boolean doubleBuffer =
(dbeSupported && (dbeSupported &&
doubleBufferVisuals.contains(new Integer(visNum))); doubleBufferVisuals.contains(Integer.valueOf(visNum)));
ret[i] = X11GraphicsConfig.getConfig(this, visNum, depth, ret[i] = X11GraphicsConfig.getConfig(this, visNum, depth,
getConfigColormap(i, screen), getConfigColormap(i, screen),
doubleBuffer); doubleBuffer);
...@@ -199,7 +199,7 @@ public class X11GraphicsDevice ...@@ -199,7 +199,7 @@ public class X11GraphicsDevice
public static native boolean isDBESupported(); public static native boolean isDBESupported();
// Callback for adding a new double buffer visual into our set // Callback for adding a new double buffer visual into our set
private void addDoubleBufferVisual(int visNum) { private void addDoubleBufferVisual(int visNum) {
doubleBufferVisuals.add(new Integer(visNum)); doubleBufferVisuals.add(Integer.valueOf(visNum));
} }
// Enumerates all visuals that support double buffering // Enumerates all visuals that support double buffering
private native void getDoubleBufferVisuals(int screen); private native void getDoubleBufferVisuals(int screen);
...@@ -239,7 +239,7 @@ public class X11GraphicsDevice ...@@ -239,7 +239,7 @@ public class X11GraphicsDevice
doubleBufferVisuals = new HashSet(); doubleBufferVisuals = new HashSet();
getDoubleBufferVisuals(screen); getDoubleBufferVisuals(screen);
doubleBuffer = doubleBuffer =
doubleBufferVisuals.contains(new Integer(visNum)); doubleBufferVisuals.contains(Integer.valueOf(visNum));
} }
defaultConfig = X11GraphicsConfig.getConfig(this, visNum, defaultConfig = X11GraphicsConfig.getConfig(this, visNum,
depth, getConfigColormap(0, screen), depth, getConfigColormap(0, screen),
......
...@@ -867,39 +867,38 @@ public class UnixPrintJob implements CancelablePrintJob { ...@@ -867,39 +867,38 @@ public class UnixPrintJob implements CancelablePrintJob {
execCmd[n++] = "/usr/bin/lp"; execCmd[n++] = "/usr/bin/lp";
execCmd[n++] = "-c"; // make a copy of the spool file execCmd[n++] = "-c"; // make a copy of the spool file
if ((pFlags & PRINTER) != 0) { if ((pFlags & PRINTER) != 0) {
execCmd[n++] = new String("-d" + printer); execCmd[n++] = "-d" + printer;
} }
if ((pFlags & BANNER) != 0) { if ((pFlags & BANNER) != 0) {
String quoteChar = "\""; String quoteChar = "\"";
execCmd[n++] = new String("-t " + quoteChar+banner+quoteChar); execCmd[n++] = "-t " + quoteChar+banner+quoteChar;
} }
if ((pFlags & COPIES) != 0) { if ((pFlags & COPIES) != 0) {
execCmd[n++] = new String("-n " + execCmd[n++] = "-n " + copies;
new Integer(copies).toString());
} }
if ((pFlags & NOSHEET) != 0) { if ((pFlags & NOSHEET) != 0) {
execCmd[n++] = new String("-o nobanner"); execCmd[n++] = "-o nobanner";
} }
if ((pFlags & OPTIONS) != 0) { if ((pFlags & OPTIONS) != 0) {
execCmd[n++] = new String("-o " + options); execCmd[n++] = "-o " + options;
} }
} else { } else {
execCmd = new String[ncomps]; execCmd = new String[ncomps];
execCmd[n++] = "/usr/bin/lpr"; execCmd[n++] = "/usr/bin/lpr";
if ((pFlags & PRINTER) != 0) { if ((pFlags & PRINTER) != 0) {
execCmd[n++] = new String("-P" + printer); execCmd[n++] = "-P" + printer;
} }
if ((pFlags & BANNER) != 0) { if ((pFlags & BANNER) != 0) {
execCmd[n++] = new String("-J " + banner); execCmd[n++] = "-J " + banner;
} }
if ((pFlags & COPIES) != 0) { if ((pFlags & COPIES) != 0) {
execCmd[n++] = new String("-#" + new Integer(copies).toString()); execCmd[n++] = "-#" + copies;
} }
if ((pFlags & NOSHEET) != 0) { if ((pFlags & NOSHEET) != 0) {
execCmd[n++] = new String("-h"); execCmd[n++] = "-h";
} }
if ((pFlags & OPTIONS) != 0) { if ((pFlags & OPTIONS) != 0) {
execCmd[n++] = new String("-o" + options); execCmd[n++] = "-o" + options;
} }
} }
execCmd[n++] = spoolFile; execCmd[n++] = spoolFile;
......
...@@ -568,7 +568,7 @@ class HTMLCodec extends InputStream { ...@@ -568,7 +568,7 @@ class HTMLCodec extends InputStream {
byte[] headerBytes = null, trailerBytes = null; byte[] headerBytes = null, trailerBytes = null;
try { try {
headerBytes = new String(header).getBytes(ENCODING); headerBytes = header.toString().getBytes(ENCODING);
trailerBytes = htmlSuffix.getBytes(ENCODING); trailerBytes = htmlSuffix.getBytes(ENCODING);
} catch (UnsupportedEncodingException cannotHappen) { } catch (UnsupportedEncodingException cannotHappen) {
} }
......
...@@ -488,7 +488,7 @@ public class WInputMethod extends InputMethodAdapter ...@@ -488,7 +488,7 @@ public class WInputMethod extends InputMethodAdapter
attrStr.addAttribute(Attribute.INPUT_METHOD_SEGMENT, attrStr.addAttribute(Attribute.INPUT_METHOD_SEGMENT,
new Annotation(null), 0, text.length()); new Annotation(null), 0, text.length());
attrStr.addAttribute(Attribute.READING, attrStr.addAttribute(Attribute.READING,
new Annotation(new String("")), 0, text.length()); new Annotation(""), 0, text.length());
} }
// set Hilight Information // set Hilight Information
......
...@@ -123,7 +123,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer { ...@@ -123,7 +123,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer {
public void setTitle(String title) { public void setTitle(String title) {
// allow a null title to pass as an empty string. // allow a null title to pass as an empty string.
if (title == null) { if (title == null) {
title = new String(""); title = "";
} }
_setTitle(title); _setTitle(title);
} }
......
...@@ -348,7 +348,7 @@ public class Win32PrintService implements PrintService, AttributeUpdater, ...@@ -348,7 +348,7 @@ public class Win32PrintService implements PrintService, AttributeUpdater,
idList = new ArrayList(); idList = new ArrayList();
for (int i=0; i < media.length; i++) { for (int i=0; i < media.length; i++) {
idList.add(new Integer(media[i])); idList.add(Integer.valueOf(media[i]));
} }
mediaSizes = getMediaSizes(idList, media); mediaSizes = getMediaSizes(idList, media);
...@@ -517,7 +517,7 @@ public class Win32PrintService implements PrintService, AttributeUpdater, ...@@ -517,7 +517,7 @@ public class Win32PrintService implements PrintService, AttributeUpdater,
if ((wid <= 0) || (ht <= 0)) { if ((wid <= 0) || (ht <= 0)) {
//Remove corresponding ID from list //Remove corresponding ID from list
if (nMedia == media.length) { if (nMedia == media.length) {
Integer remObj = new Integer(media[i]); Integer remObj = Integer.valueOf(media[i]);
idList.remove(idList.indexOf(remObj)); idList.remove(idList.indexOf(remObj));
} }
continue; continue;
...@@ -539,7 +539,7 @@ public class Win32PrintService implements PrintService, AttributeUpdater, ...@@ -539,7 +539,7 @@ public class Win32PrintService implements PrintService, AttributeUpdater,
msList.add(ms); msList.add(ms);
} catch(IllegalArgumentException e) { } catch(IllegalArgumentException e) {
if (nMedia == media.length) { if (nMedia == media.length) {
Integer remObj = new Integer(media[i]); Integer remObj = Integer.valueOf(media[i]);
idList.remove(idList.indexOf(remObj)); idList.remove(idList.indexOf(remObj));
} }
} }
...@@ -984,7 +984,7 @@ public class Win32PrintService implements PrintService, AttributeUpdater, ...@@ -984,7 +984,7 @@ public class Win32PrintService implements PrintService, AttributeUpdater,
// cannot be null but to be safe, add a check // cannot be null but to be safe, add a check
if ((idList != null) && (mediaSizes != null) && if ((idList != null) && (mediaSizes != null) &&
(idList.size() == mediaSizes.length)) { (idList.size() == mediaSizes.length)) {
Integer defIdObj = new Integer(defPaper); Integer defIdObj = Integer.valueOf(defPaper);
int index = idList.indexOf(defIdObj); int index = idList.indexOf(defIdObj);
if (index>=0 && index<mediaSizes.length) { if (index>=0 && index<mediaSizes.length) {
return mediaSizes[index].getMediaSizeName(); return mediaSizes[index].getMediaSizeName();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册