# HG changeset patch # User iignatyev # Date 1479893121 -10800 # Wed Nov 23 12:25:21 2016 +0300 # Node ID ea6708033313ee9cd05ada9866284c0f5a553299 # Parent 2a1f97c0ad3d2ca0b988ab8d5e414076259e1ea7 8170228: register closed @requires property setter Reviewed-by: diff --git a/test/jtreg-ext/requires/VMProps.java b/test/jtreg-ext/requires/VMProps.java --- a/test/jtreg-ext/requires/VMProps.java +++ b/test/jtreg-ext/requires/VMProps.java @@ -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);