Skip to content

Commit 0a758e5

Browse files
committed
Replaced deprecated construtors of Boolean, Integer, and Float
1 parent 7f56ca5 commit 0a758e5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

core/src/processing/core/PApplet.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6585,7 +6585,7 @@ static final public boolean parseBoolean(float what) {
65856585
* @return true if 'what' is "true" or "TRUE", false otherwise
65866586
*/
65876587
static final public boolean parseBoolean(String what) {
6588-
return new Boolean(what).booleanValue();
6588+
return Boolean.valueOf(what);
65896589
}
65906590

65916591
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@@ -6643,7 +6643,7 @@ static final public boolean[] parseBoolean(float what[]) {
66436643
static final public boolean[] parseBoolean(String what[]) {
66446644
boolean outgoing[] = new boolean[what.length];
66456645
for (int i = 0; i < what.length; i++) {
6646-
outgoing[i] = new Boolean(what[i]).booleanValue();
6646+
outgoing[i] = Boolean.valueOf(what[i]);
66476647
}
66486648
return outgoing;
66496649
}
@@ -6932,7 +6932,7 @@ static final public float parseFloat(String what) {
69326932

69336933
static final public float parseFloat(String what, float otherwise) {
69346934
try {
6935-
return new Float(what).floatValue();
6935+
return Float.valueOf(what);
69366936
} catch (NumberFormatException e) { }
69376937

69386938
return otherwise;
@@ -6982,7 +6982,7 @@ static final public float[] parseFloat(String what[], float missing) {
69826982
float output[] = new float[what.length];
69836983
for (int i = 0; i < what.length; i++) {
69846984
try {
6985-
output[i] = new Float(what[i]).floatValue();
6985+
output[i] = Float.valueOf(what[i]);
69866986
} catch (NumberFormatException e) {
69876987
output[i] = missing;
69886988
}

core/src/processing/core/PShapeOBJ.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ static protected void parseMTL(PApplet parent, String path,
358358
// Starting new material.
359359
String mtlname = parts[1];
360360
currentMtl = new OBJMaterial(mtlname);
361-
materialsHash.put(mtlname, new Integer(materials.size()));
361+
materialsHash.put(mtlname, Integer.valueOf(materials.size()));
362362
materials.add(currentMtl);
363363
} else if (parts[0].equals("map_Kd") && parts.length > 1) {
364364
// Loading texture map.

0 commit comments

Comments
 (0)