mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge pull request #2826 from federicobond/primitive-optimization
Optimize creation of boxed primitives
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user