Modify implementation such that
java.nio.file.Path.of(String first, String... more) and
java.nio.file.Paths.get(String first, String... more) throw a
The package specification of
java.nio.file states that
Unless otherwise noted, passing a null argument to a constructor or method of any class or interface in this package will cause a NullPointerException to be thrown.
but the aforementioned methods do not throw a
NullPointerException. This is incorrect behavior not only due to failing to throw the exception, but more in terms of allowing a corrupted path name containing the string
"null" to be created. This could lead to unexpected and possibly confusing behavior.
Modify the implementations of
getPath(String first, String... more) in the
WindowsFileSystem classes in the internal
sun.nio.fs package such that they throw
NullPointerException if the first parameter
Path.of() which calls
There is no change to the existing specification per se.