changeset 13160:f7504936fcea

use new mechanism for scoping a DebugConfig change
author Doug Simon <doug.simon@oracle.com>
date Mon, 25 Nov 2013 17:30:07 +0100
parents 447e912c345c
children 3214b704060a
files graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierVerificationTest.java
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierVerificationTest.java	Mon Nov 25 17:29:44 2013 +0100
+++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierVerificationTest.java	Mon Nov 25 17:30:07 2013 +0100
@@ -693,9 +693,9 @@
                 };
 
                 DebugConfig debugConfig = DebugScope.getConfig();
-                try {
+                DebugConfig fixedConfig = Debug.fixedConfig(false, false, false, false, debugConfig.dumpHandlers(), debugConfig.output());
+                try (DebugConfigScope s = Debug.setConfig(fixedConfig)) {
                     ReentrantNodeIterator.apply(closure, graph.start(), false, null);
-                    Debug.setConfig(Debug.fixedConfig(false, false, false, false, debugConfig.dumpHandlers(), debugConfig.output()));
                     new WriteBarrierVerificationPhase().apply(graph);
                 } catch (AssertionError error) {
                     /*
@@ -704,8 +704,6 @@
                      */
                     Assert.assertTrue(error.getMessage().contains("Write barrier must be present"));
                     return error;
-                } finally {
-                    Debug.setConfig(debugConfig);
                 }
                 return null;
             }