8191846: jstat prints debug message when debugging is disabled
Reviewed-by: ehelin, rehn
--- a/src/jdk.jcmd/share/classes/sun/tools/jstat/ExpressionResolver.java Mon Nov 27 03:11:38 2017 -0800
+++ b/src/jdk.jcmd/share/classes/sun/tools/jstat/ExpressionResolver.java Mon Nov 27 12:38:47 2017 +0100
@@ -69,8 +69,10 @@
// look it up
Monitor m = vm.findByName(id.getName());
if (m == null) {
- System.err.println("Warning: Unresolved Symbol: "
- + id.getName() + " substituted NaN");
+ if (debug) {
+ System.err.println("Warning: Unresolved Symbol: "
+ + id.getName() + " substituted NaN");
+ }
return new Literal(Double.valueOf(Double.NaN));
}
if (m.getVariability() == Variability.CONSTANT) {