# HG changeset patch # User iignatyev # Date 1479893121 -10800 # Node ID 8009d4cba2ea4493def9b7cb958b439b4894e44a # Parent 406dfb60de57e42fa1594d3825cf399483855e73 8170228: register closed @requires property setter Reviewed-by: vlivanov, dfazunen diff -r 406dfb60de57 -r 8009d4cba2ea test/jtreg-ext/requires/VMProps.java --- a/test/jtreg-ext/requires/VMProps.java Thu Nov 24 15:27:33 2016 +0100 +++ b/test/jtreg-ext/requires/VMProps.java Wed Nov 23 12:25:21 2016 +0300 @@ -25,6 +25,7 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -62,7 +63,7 @@ map.put("vm.debug", vmDebug()); vmGC(map); // vm.gc.X = true/false - dump(map); + VMProps.dump(map); return map; } @@ -180,7 +181,7 @@ * * @param map */ - protected void dump(Map map) { + protected static void dump(Map map) { String dumpFileName = System.getProperty("vmprops.dump"); if (dumpFileName == null) { return; @@ -188,7 +189,7 @@ List lines = new ArrayList<>(); map.forEach((k, v) -> lines.add(k + ":" + v)); try { - Files.write(Paths.get(dumpFileName), lines); + Files.write(Paths.get(dumpFileName), lines, StandardOpenOption.APPEND); } catch (IOException e) { throw new RuntimeException("Failed to dump properties into '" + dumpFileName + "'", e);