From 901a4bf1c15dde97781f059ce3afbae23477f422 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 16 Oct 2013 11:39:09 -0400 Subject: [PATCH] argh, this println() thing is a mess... --- core/src/processing/core/PApplet.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 1077b794a..129a3516b 100755 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -4501,13 +4501,17 @@ public class PApplet extends Applet /** - * Use printArray() instead. This function causes a warning because the new - * print(Object...) and println(Object...) functions can't be reliably - * bound by the compiler. + * For arrays, use printArray() instead. This function causes a warning + * because the new print(Object...) and println(Object...) functions can't + * be reliably bound by the compiler. */ - @Deprecated static public void println(Object what) { - printArray(what); + if (what != null && what.getClass().isArray()) { + printArray(what); + } else { + System.out.println(what.toString()); + System.out.flush(); + } }