8223178: Improve FileSystems.newFileSystem example with map factory methods
authordarcy
Fri, 03 May 2019 14:09:19 -0700
changeset 54712 029b56549e22
parent 54711 297ddf282627
child 54713 040bf087ae39
8223178: Improve FileSystems.newFileSystem example with map factory methods Reviewed-by: alanb, clanger, bpb
src/java.base/share/classes/java/nio/file/FileSystems.java
--- 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