Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/processing/app/Base.java
Original file line number Diff line number Diff line change
Expand Up @@ -2381,7 +2381,7 @@ static public int showYesNoCancelQuestion(Editor editor, String title,
// 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);
Expand Down
2 changes: 1 addition & 1 deletion app/src/processing/app/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ static public void unset(String attribute) {

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'
Expand Down
4 changes: 2 additions & 2 deletions app/src/processing/mode/java/JavaEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ public void propertyChange(PropertyChangeEvent e) {
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.");
}
Expand Down Expand Up @@ -832,4 +832,4 @@ public void internalCloseRunner() {
//jmode.handleStop();
handleStop();
}
}
}
4 changes: 2 additions & 2 deletions core/methods/demo/PApplet.java
Original file line number Diff line number Diff line change
Expand Up @@ -5959,7 +5959,7 @@ static final public boolean parseBoolean(float what) {
* @return true if 'what' is "true" or "TRUE", false otherwise
*/
static final public boolean parseBoolean(String what) {
return new Boolean(what).booleanValue();
return Boolean.parseBoolean(what);
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Expand Down Expand Up @@ -6017,7 +6017,7 @@ static final public boolean[] parseBoolean(float what[]) {
static final public boolean[] parseBoolean(String what[]) {
boolean outgoing[] = new boolean[what.length];
for (int i = 0; i < what.length; i++) {
outgoing[i] = new Boolean(what[i]).booleanValue();
outgoing[i] = Boolean.parseBoolean(what[i]);
}
return outgoing;
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/processing/core/PApplet.java
Original file line number Diff line number Diff line change
Expand Up @@ -9260,7 +9260,7 @@ static final public boolean parseBoolean(float what) {
* @return true if 'what' is "true" or "TRUE", false otherwise
*/
static final public boolean parseBoolean(String what) {
return new Boolean(what).booleanValue();
return Boolean.parseBoolean(what);
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Expand Down Expand Up @@ -9320,7 +9320,7 @@ static final public boolean[] parseBoolean(float what[]) {
static final public boolean[] parseBoolean(String what[]) {
boolean outgoing[] = new boolean[what.length];
for (int i = 0; i < what.length; i++) {
outgoing[i] = new Boolean(what[i]).booleanValue();
outgoing[i] = Boolean.parseBoolean(what[i]);
}
return outgoing;
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/processing/core/PShapeOBJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ static protected void parseMTL(PApplet parent, String path,
// Starting new material.
String mtlname = parts[1];
currentMtl = new OBJMaterial(mtlname);
materialsHash.put(mtlname, new Integer(materials.size()));
materialsHash.put(mtlname, Integer.valueOf(materials.size()));
materials.add(currentMtl);
} else if (parts[0].equals("map_Kd") && parts.length > 1) {
// Loading texture map.
Expand Down
6 changes: 3 additions & 3 deletions core/src/processing/data/FloatDict.java
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ protected void create(String what, float much) {
keys = PApplet.expand(keys);
values = PApplet.expand(values);
}
indices.put(what, new Integer(count));
indices.put(what, Integer.valueOf(count));
keys[count] = what;
values[count] = much;
count++;
Expand Down Expand Up @@ -540,8 +540,8 @@ public void swap(int a, int b) {
keys[b] = tkey;
values[b] = tvalue;

indices.put(keys[a], new Integer(a));
indices.put(keys[b], new Integer(b));
indices.put(keys[a], Integer.valueOf(a));
indices.put(keys[b], Integer.valueOf(b));
}


Expand Down
6 changes: 3 additions & 3 deletions core/src/processing/data/IntDict.java
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ protected void create(String what, int much) {
keys = PApplet.expand(keys);
values = PApplet.expand(values);
}
indices.put(what, new Integer(count));
indices.put(what, Integer.valueOf(count));
keys[count] = what;
values[count] = much;
count++;
Expand Down Expand Up @@ -532,8 +532,8 @@ public void swap(int a, int b) {
keys[b] = tkey;
values[b] = tvalue;

indices.put(keys[a], new Integer(a));
indices.put(keys[b], new Integer(b));
indices.put(keys[a], Integer.valueOf(a));
indices.put(keys[b], Integer.valueOf(b));
}


Expand Down
14 changes: 7 additions & 7 deletions core/src/processing/data/JSONArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ protected JSONArray(JSONTokener x) {
public JSONArray(IntList list) {
myArrayList = new ArrayList<Object>();
for (int item : list.values()) {
myArrayList.add(new Integer(item));
myArrayList.add(Integer.valueOf(item));
}
}

Expand Down Expand Up @@ -718,7 +718,7 @@ public JSONArray append(String value) {
* @return this.
*/
public JSONArray append(int value) {
this.append(new Integer(value));
this.append(Integer.valueOf(value));
return this;
}

Expand All @@ -731,7 +731,7 @@ public JSONArray append(int value) {
* @return this.
*/
public JSONArray append(long value) {
this.append(new Long(value));
this.append(Long.valueOf(value));
return this;
}

Expand All @@ -758,7 +758,7 @@ public JSONArray append(float value) {
* @return this.
*/
public JSONArray append(double value) {
Double d = new Double(value);
Double d = value;
JSONObject.testValidity(d);
this.append(d);
return this;
Expand Down Expand Up @@ -884,7 +884,7 @@ public JSONArray setString(int index, String value) {
* @see JSONArray#setBoolean(int, boolean)
*/
public JSONArray setInt(int index, int value) {
this.set(index, new Integer(value));
this.set(index, Integer.valueOf(value));
return this;
}

Expand All @@ -899,7 +899,7 @@ public JSONArray setInt(int index, int value) {
* @throws JSONException If the index is negative.
*/
public JSONArray setLong(int index, long value) {
return set(index, new Long(value));
return set(index, Long.valueOf(value));
}


Expand Down Expand Up @@ -936,7 +936,7 @@ public JSONArray setFloat(int index, float value) {
* not finite.
*/
public JSONArray setDouble(int index, double value) {
return set(index, new Double(value));
return set(index, Double.valueOf(value));
}


Expand Down
6 changes: 3 additions & 3 deletions core/src/processing/data/JSONObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ public JSONObject setString(String key, String value) {
* @see JSONObject#setBoolean(String, boolean)
*/
public JSONObject setInt(String key, int value) {
this.put(key, new Integer(value));
this.put(key, Integer.valueOf(value));
return this;
}

Expand All @@ -1182,7 +1182,7 @@ public JSONObject setInt(String key, int value) {
* @throws JSONException If the key is null.
*/
public JSONObject setLong(String key, long value) {
this.put(key, new Long(value));
this.put(key, Long.valueOf(value));
return this;
}

Expand Down Expand Up @@ -1494,7 +1494,7 @@ static protected Object stringToValue(String string) {
} else {
Long myLong = new Long(string);
if (myLong.longValue() == myLong.intValue()) {
return new Integer(myLong.intValue());
return Integer.valueOf(myLong.intValue());
} else {
return myLong;
}
Expand Down
6 changes: 3 additions & 3 deletions core/src/processing/data/StringDict.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ protected void create(String key, String value) {
keys = PApplet.expand(keys);
values = PApplet.expand(values);
}
indices.put(key, new Integer(count));
indices.put(key, Integer.valueOf(count));
keys[count] = key;
values[count] = value;
count++;
Expand Down Expand Up @@ -325,8 +325,8 @@ public void swap(int a, int b) {
keys[b] = tkey;
values[b] = tvalue;

indices.put(keys[a], new Integer(a));
indices.put(keys[b], new Integer(b));
indices.put(keys[a], Integer.valueOf(a));
indices.put(keys[b], Integer.valueOf(b));
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ private Object readInteger() {
intBytes[2] = bytes[streamPosition++];
intBytes[3] = bytes[streamPosition++];
BigInteger intBits = new BigInteger(intBytes);
return new Integer(intBits.intValue());
return Integer.valueOf(intBits.intValue());
}

/**
Expand Down
12 changes: 6 additions & 6 deletions pdex/src/galsasson/mode/tweak/OSCSender.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public static void sendFloat(int index, float val, int port) throws Exception
{
OSCPortOut sender = new OSCPortOut(InetAddress.getByName("localhost"), port);
ArrayList<Object> args = new ArrayList<Object>();
args.add(new Integer(index));
args.add(new Float(val));
args.add(Integer.valueOf(index));
args.add(Float.valueOf(val));
OSCMessage msg = new OSCMessage("/tm_change_float", args);
try {
sender.send(msg);
Expand All @@ -25,8 +25,8 @@ public static void sendInt(int index, int val, int port) throws Exception
{
OSCPortOut sender = new OSCPortOut(InetAddress.getByName("localhost"), port);
ArrayList<Object> args = new ArrayList<Object>();
args.add(new Integer(index));
args.add(new Integer(val));
args.add(Integer.valueOf(index));
args.add(Integer.valueOf(val));
OSCMessage msg = new OSCMessage("/tm_change_int", args);
try {
sender.send(msg);
Expand All @@ -40,8 +40,8 @@ public static void sendLong(int index, long val, int port) throws Exception
{
OSCPortOut sender = new OSCPortOut(InetAddress.getByName("localhost"), port);
ArrayList<Object> args = new ArrayList<Object>();
args.add(new Integer(index));
args.add(new Long(val));
args.add(Integer.valueOf(index));
args.add(Long.valueOf(val));
OSCMessage msg = new OSCMessage("/tm_change_long", args);
try {
sender.send(msg);
Expand Down