mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 18:35:37 +01:00
remove a handful of warnings
This commit is contained in:
@@ -2364,7 +2364,7 @@ public class PGraphicsJava2D extends PGraphics {
|
||||
if (primarySurface) {
|
||||
// 'offscreen' will probably be removed in the next release
|
||||
if (useOffscreen) {
|
||||
raster = ((BufferedImage) offscreen).getRaster();
|
||||
raster = offscreen.getRaster();
|
||||
} else if (image instanceof VolatileImage) {
|
||||
// when possible, we'll try VolatileImage
|
||||
raster = ((VolatileImage) image).getSnapshot().getRaster();
|
||||
|
||||
@@ -1644,10 +1644,10 @@ public class JSONObject {
|
||||
return value.toString();
|
||||
}
|
||||
if (value instanceof Map) {
|
||||
return new JSONObject((Map)value).toString();
|
||||
return new JSONObject(value).toString();
|
||||
}
|
||||
if (value instanceof Collection) {
|
||||
return new JSONArray((Collection)value).toString();
|
||||
return new JSONArray(value).toString();
|
||||
}
|
||||
if (value.getClass().isArray()) {
|
||||
return new JSONArray(value).toString();
|
||||
@@ -1683,13 +1683,13 @@ public class JSONObject {
|
||||
}
|
||||
|
||||
if (object instanceof Collection) {
|
||||
return new JSONArray((Collection)object);
|
||||
return new JSONArray(object);
|
||||
}
|
||||
if (object.getClass().isArray()) {
|
||||
return new JSONArray(object);
|
||||
}
|
||||
if (object instanceof Map) {
|
||||
return new JSONObject((Map)object);
|
||||
return new JSONObject(object);
|
||||
}
|
||||
Package objectPackage = object.getClass().getPackage();
|
||||
String objectPackageName = objectPackage != null
|
||||
@@ -1732,9 +1732,9 @@ public class JSONObject {
|
||||
} else if (value instanceof JSONArray) {
|
||||
((JSONArray) value).write(writer, indentFactor, indent);
|
||||
} else if (value instanceof Map) {
|
||||
new JSONObject((Map) value).write(writer, indentFactor, indent);
|
||||
new JSONObject(value).write(writer, indentFactor, indent);
|
||||
} else if (value instanceof Collection) {
|
||||
new JSONArray((Collection) value).write(writer, indentFactor,
|
||||
new JSONArray(value).write(writer, indentFactor,
|
||||
indent);
|
||||
} else if (value.getClass().isArray()) {
|
||||
new JSONArray(value).write(writer, indentFactor, indent);
|
||||
|
||||
@@ -961,7 +961,7 @@ public class PJOGL extends PGL {
|
||||
InputEvent.ALT_MASK);
|
||||
|
||||
char keyChar;
|
||||
if ((int)nativeEvent.getKeyChar() == 0) {
|
||||
if (nativeEvent.getKeyChar() == 0) {
|
||||
keyChar = PConstants.CODED;
|
||||
} else {
|
||||
keyChar = nativeEvent.getKeyChar();
|
||||
|
||||
Reference in New Issue
Block a user