Skip to content

Commit d05dfbf

Browse files
committed
argh, this println() thing is a mess...
1 parent 3af44b6 commit d05dfbf

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

core/src/processing/core/PApplet.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4501,13 +4501,17 @@ static public void println(String[] array) {
45014501

45024502

45034503
/**
4504-
* Use printArray() instead. This function causes a warning because the new
4505-
* print(Object...) and println(Object...) functions can't be reliably
4506-
* bound by the compiler.
4504+
* For arrays, use printArray() instead. This function causes a warning
4505+
* because the new print(Object...) and println(Object...) functions can't
4506+
* be reliably bound by the compiler.
45074507
*/
4508-
@Deprecated
45094508
static public void println(Object what) {
4510-
printArray(what);
4509+
if (what != null && what.getClass().isArray()) {
4510+
printArray(what);
4511+
} else {
4512+
System.out.println(what.toString());
4513+
System.out.flush();
4514+
}
45114515
}
45124516

45134517

0 commit comments

Comments
 (0)