mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 18:35:37 +01:00
add special case for null in println(), remove println() from dataPath()
This commit is contained in:
@@ -4512,7 +4512,9 @@ public class PApplet extends Applet
|
||||
* be reliably bound by the compiler.
|
||||
*/
|
||||
static public void println(Object what) {
|
||||
if (what != null && what.getClass().isArray()) {
|
||||
if (what == null) {
|
||||
System.out.println("null");
|
||||
} else if (what.getClass().isArray()) {
|
||||
printArray(what);
|
||||
} else {
|
||||
System.out.println(what.toString());
|
||||
@@ -7876,7 +7878,6 @@ public class PApplet extends Applet
|
||||
// http://code.google.com/p/processing/issues/detail?id=1073
|
||||
File containingFolder = new File(urlDecode(jarPath)).getParentFile();
|
||||
File dataFolder = new File(containingFolder, "data");
|
||||
System.out.println(dataFolder);
|
||||
return new File(dataFolder, where);
|
||||
}
|
||||
// Windows, Linux, or when not using a Mac OS X .app file
|
||||
@@ -10894,7 +10895,7 @@ public class PApplet extends Applet
|
||||
final String[] argsWithSketchName = new String[args.length + 1];
|
||||
System.arraycopy(args, 0, argsWithSketchName, 0, args.length);
|
||||
final String className = this.getClass().getSimpleName();
|
||||
final String cleanedClass =
|
||||
final String cleanedClass =
|
||||
className.replaceAll("__[^_]+__\\$", "").replaceAll("\\$\\d+", "");
|
||||
argsWithSketchName[args.length] = cleanedClass;
|
||||
runSketch(argsWithSketchName, this);
|
||||
|
||||
Reference in New Issue
Block a user