diff --git a/core/src/processing/core/PShapeSVG.java b/core/src/processing/core/PShapeSVG.java index bf7d3ef19..da95d7eed 100644 --- a/core/src/processing/core/PShapeSVG.java +++ b/core/src/processing/core/PShapeSVG.java @@ -1811,7 +1811,7 @@ public class PShapeSVG extends PShape { namedGlyphs.put(fg.name, fg); } if (fg.unicode != 0) { - unicodeGlyphs.put(new Character(fg.unicode), fg); + unicodeGlyphs.put(Character.valueOf(fg.unicode), fg); } } glyphs[glyphCount++] = fg; @@ -1845,7 +1845,7 @@ public class PShapeSVG extends PShape { char[] c = str.toCharArray(); for (int i = 0; i < c.length; i++) { // call draw on each char (pulling it w/ the unicode table) - FontGlyph fg = unicodeGlyphs.get(new Character(c[i])); + FontGlyph fg = unicodeGlyphs.get(Character.valueOf(c[i])); if (fg != null) { fg.draw(g); // add horizAdvX/unitsPerEm to the x coordinate along the way @@ -1863,7 +1863,7 @@ public class PShapeSVG extends PShape { float s = size / face.unitsPerEm; g.translate(x, y); g.scale(s, -s); - FontGlyph fg = unicodeGlyphs.get(new Character(c)); + FontGlyph fg = unicodeGlyphs.get(Character.valueOf(c)); if (fg != null) g.shape(fg); g.popMatrix(); } @@ -1874,7 +1874,7 @@ public class PShapeSVG extends PShape { char[] c = str.toCharArray(); for (int i = 0; i < c.length; i++) { // call draw on each char (pulling it w/ the unicode table) - FontGlyph fg = unicodeGlyphs.get(new Character(c[i])); + FontGlyph fg = unicodeGlyphs.get(Character.valueOf(c[i])); if (fg != null) { w += (float) fg.horizAdvX / face.unitsPerEm; } diff --git a/core/src/processing/data/JSONObject.java b/core/src/processing/data/JSONObject.java index 705ee3ff8..f5f02541e 100644 --- a/core/src/processing/data/JSONObject.java +++ b/core/src/processing/data/JSONObject.java @@ -1492,7 +1492,7 @@ public class JSONObject { return d; } } else { - Long myLong = new Long(string); + Long myLong = Long.valueOf(string); if (myLong.longValue() == myLong.intValue()) { return Integer.valueOf(myLong.intValue()); } else {