Merge pull request #2826 from federicobond/primitive-optimization

Optimize creation of boxed primitives
This commit is contained in:
Ben Fry
2014-08-28 11:02:02 -04:00
13 changed files with 35 additions and 35 deletions
+1 -1
View File
@@ -2381,7 +2381,7 @@ public class Base {
// on macosx, setting the destructive property places this option
// away from the others at the lefthand side
pane.putClientProperty("Quaqua.OptionPane.destructiveOption",
new Integer(2));
Integer.valueOf(2));
JDialog dialog = pane.createDialog(editor, null);
dialog.setVisible(true);
+1 -1
View File
@@ -237,7 +237,7 @@ public class Preferences {
static public boolean getBoolean(String attribute) {
String value = get(attribute); //, null);
return (new Boolean(value)).booleanValue();
return Boolean.parseBoolean(value);
/*
supposedly not needed, because anything besides 'true'
+2 -2
View File
@@ -577,7 +577,7 @@ public class JavaEditor extends Editor {
Object value = optionPane.getValue();
if (value.equals(options[0])) {
return jmode.handleExportApplication(sketch);
} else if (value.equals(options[1]) || value.equals(new Integer(-1))) {
} else if (value.equals(options[1]) || value.equals(Integer.valueOf(-1))) {
// closed window by hitting Cancel or ESC
statusNotice("Export to Application canceled.");
}
@@ -832,4 +832,4 @@ public class JavaEditor extends Editor {
//jmode.handleStop();
handleStop();
}
}
}