changeset 54712:029b56549e22

8223178: Improve FileSystems.newFileSystem example with map factory methods Reviewed-by: alanb, clanger, bpb
author darcy
date Fri, 03 May 2019 14:09:19 -0700
parents 297ddf282627
children 040bf087ae39
files src/java.base/share/classes/java/nio/file/FileSystems.java
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/nio/file/FileSystems.java	Fri May 03 09:34:02 2019 -0700
+++ b/src/java.base/share/classes/java/nio/file/FileSystems.java	Fri May 03 14:09:19 2019 -0700
@@ -252,10 +252,8 @@
      * Suppose there is a provider identified by the scheme {@code "memory"}
      * installed:
      * <pre>
-     *   Map&lt;String,String&gt; env = new HashMap&lt;&gt;();
-     *   env.put("capacity", "16G");
-     *   env.put("blockSize", "4k");
-     *   FileSystem fs = FileSystems.newFileSystem(URI.create("memory:///?name=logfs"), env);
+     *  FileSystem fs = FileSystems.newFileSystem(URI.create("memory:///?name=logfs"),
+     *                                            Map.of("capacity", "16G", "blockSize", "4k"));
      * </pre>
      *
      * @param   uri