diff --git a/app/src/processing/app/Preferences.java b/app/src/processing/app/Preferences.java index 1a47fd35f..809765702 100644 --- a/app/src/processing/app/Preferences.java +++ b/app/src/processing/app/Preferences.java @@ -64,7 +64,7 @@ public class Preferences { * Windows XP needs 66, and my Ubuntu machine needs 80+, so 80 seems proper. */ static public int BUTTON_WIDTH = - Integer.valueOf(Language.text("preferences.button.width")); + Integer.parseInt(Language.text("preferences.button.width")); /** height of the EditorHeader, EditorToolbar, and EditorStatus */ static final int GRID_SIZE = 32; diff --git a/app/src/processing/app/tools/ColorSelector.java b/app/src/processing/app/tools/ColorSelector.java index f3bf693f7..b36a6ae12 100644 --- a/app/src/processing/app/tools/ColorSelector.java +++ b/app/src/processing/app/tools/ColorSelector.java @@ -43,7 +43,7 @@ public class ColorSelector implements Tool { * Only create one instance, otherwise we'll have dozens of animation * threads going if you open/close a lot of editor windows. */ - static ColorChooser selector; + private static volatile ColorChooser selector; private Editor editor; diff --git a/app/src/processing/mode/java/PresentMode.java b/app/src/processing/mode/java/PresentMode.java index 05ada7d9d..dc0f1dd11 100644 --- a/app/src/processing/mode/java/PresentMode.java +++ b/app/src/processing/mode/java/PresentMode.java @@ -49,11 +49,6 @@ public class PresentMode { //JMenu preferencesMenu; static JComboBox selector; - /** - * Index of the currently selected display to be used for present mode. - */ - static GraphicsDevice device; - static { GraphicsEnvironment environment = @@ -75,7 +70,6 @@ public class PresentMode { selector.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { int index = selector.getSelectedIndex(); - //device = devices[index]; Preferences.setInteger("run.present.display", index + 1); } }); diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 20c708866..3a3534750 100755 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -2637,7 +2637,7 @@ public class PApplet extends Applet // protected int eventCount; - class InternalEventQueue { + static class InternalEventQueue { protected Event queue[] = new Event[10]; protected int offset; protected int count; @@ -9049,7 +9049,7 @@ public class PApplet extends Applet //} if (splitCount == 0) { String splits[] = new String[1]; - splits[0] = new String(value); + splits[0] = value; return splits; } //int pieceCount = splitCount + 1; diff --git a/core/src/processing/core/PShapeSVG.java b/core/src/processing/core/PShapeSVG.java index 02e81e0c9..d91e1b3f2 100644 --- a/core/src/processing/core/PShapeSVG.java +++ b/core/src/processing/core/PShapeSVG.java @@ -1814,7 +1814,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; @@ -1848,7 +1848,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 @@ -1866,7 +1866,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(); } @@ -1877,7 +1877,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 { diff --git a/core/src/processing/data/Table.java b/core/src/processing/data/Table.java index efe5a9e75..0b8107b67 100644 --- a/core/src/processing/data/Table.java +++ b/core/src/processing/data/Table.java @@ -3862,7 +3862,7 @@ public class Table { // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - class HashMapBlows { + static class HashMapBlows { HashMap dataToIndex = new HashMap(); ArrayList indexToData = new ArrayList(); diff --git a/core/src/processing/opengl/PJOGL.java b/core/src/processing/opengl/PJOGL.java index 7e2c4e730..937ae9b2d 100644 --- a/core/src/processing/opengl/PJOGL.java +++ b/core/src/processing/opengl/PJOGL.java @@ -1203,7 +1203,7 @@ public class PJOGL extends PGL { } - protected class Tessellator implements PGL.Tessellator { + protected static class Tessellator implements PGL.Tessellator { protected GLUtessellator tess; protected TessellatorCallback callback; protected GLUCallback gluCallback; diff --git a/core/src/processing/opengl/PShader.java b/core/src/processing/opengl/PShader.java index b34351c87..aad807194 100644 --- a/core/src/processing/opengl/PShader.java +++ b/core/src/processing/opengl/PShader.java @@ -1438,7 +1438,7 @@ public class PShader implements PConstants { // // Class to store a user-specified value for a uniform parameter // in the shader - protected class UniformValue { + protected static class UniformValue { static final int INT1 = 0; static final int INT2 = 1; static final int INT3 = 2;