# HG changeset patch # User Gilles Duboscq # Date 1400165083 -7200 # Node ID 4ead444b15aa8c13cac39e2e3a3ea43e72664d9b # Parent 8d0242a07f7ebb1dc9ca4f8fef35423c3f09b25d Fix inverted condition in Debug.create(Metric|Timer) diff -r 8d0242a07f7e -r 4ead444b15aa graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java --- a/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java Thu May 15 15:35:17 2014 +0200 +++ b/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java Thu May 15 16:44:43 2014 +0200 @@ -741,7 +741,7 @@ private static DebugMetric createMetric(String format, Object arg1, Object arg2) { String name = formatDebugName(format, arg1, arg2); - boolean conditional = enabledMetrics != null && enabledMetrics.contains(name); + boolean conditional = enabledMetrics == null || !enabledMetrics.contains(name); return new MetricImpl(name, conditional); } @@ -981,7 +981,7 @@ private static DebugTimer createTimer(String format, Object arg1, Object arg2) { String name = formatDebugName(format, arg1, arg2); - boolean conditional = enabledTimers != null && enabledTimers.contains(name); + boolean conditional = enabledTimers == null || !enabledTimers.contains(name); return new TimerImpl(name, conditional); }