8191846: jstat prints debug message when debugging is disabled

Reviewed-by: ehelin, rehn
This commit is contained in:
Per Lidén 2017-11-27 12:38:47 +01:00
parent 250c05ee4c
commit 9771e4daa7

View File

@ -69,8 +69,10 @@ public class ExpressionResolver implements ExpressionEvaluator {
// 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) {