8223178: Improve FileSystems.newFileSystem example with map factory methods
Reviewed-by: alanb, clanger, bpb
--- 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<String,String> env = new HashMap<>();
- * 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