# HG changeset patch # User Doug Simon # Date 1385397007 -3600 # Node ID f7504936fcea3017c9e8ff3627f190809a733566 # Parent 447e912c345c11e718d6cc5b5fd7fad13c7c620e use new mechanism for scoping a DebugConfig change diff -r 447e912c345c -r f7504936fcea graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierVerificationTest.java --- 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; }