# HG changeset patch # User prr # Date 1400694614 25200 # Node ID 147ac5785a842df1eab5736deaa8a5af38451275 # Parent 6aff20f916b2e18da433a6327e257f029ee708b2 8016451: Scary messages emitted by build.tools.generatenimbus.PainterGenerator during build Reviewed-by: alexsch, anthony diff -r 6aff20f916b2 -r 147ac5785a84 jdk/make/src/classes/build/tools/generatenimbus/PainterGenerator.java --- a/jdk/make/src/classes/build/tools/generatenimbus/PainterGenerator.java Wed May 21 16:48:04 2014 +0400 +++ b/jdk/make/src/classes/build/tools/generatenimbus/PainterGenerator.java Wed May 21 10:50:14 2014 -0700 @@ -57,6 +57,9 @@ * @author Jasper Potts */ public class PainterGenerator { + + private static final boolean debug = false; + //a handful of counters, incremented whenever the associated object type is encounted. //These counters form the basis of the field and method suffixes. //These are all 1 based, because I felt like it :-) @@ -384,16 +387,24 @@ } if (Float.isNaN(r)) { - System.err.println("[Error] Encountered NaN: encode(" + x + ", " + a + ", " + b + ", " + w + ")"); + if (debug) { + System.err.println("[Error] Encountered NaN: encode(" + x + ", " + a + ", " + b + ", " + w + ")"); + } return 0; } else if (Float.isInfinite(r)) { - System.err.println("[Error] Encountered Infinity: encode(" + x + ", " + a + ", " + b + ", " + w + ")"); + if (debug) { + System.err.println("[Error] Encountered Infinity: encode(" + x + ", " + a + ", " + b + ", " + w + ")"); + } return 0; } else if (r < 0) { - System.err.println("[Error] encoded value was less than 0: encode(" + x + ", " + a + ", " + b + ", " + w + ")"); + if (debug) { + System.err.println("[Error] encoded value was less than 0: encode(" + x + ", " + a + ", " + b + ", " + w + ")"); + } return 0; } else if (r > 3) { - System.err.println("[Error] encoded value was greater than 3: encode(" + x + ", " + a + ", " + b + ", " + w + ")"); + if (debug) { + System.err.println("[Error] encoded value was greater than 3: encode(" + x + ", " + a + ", " + b + ", " + w + ")"); + } return 3; } else { return r;