8254876: (fs) NullPointerException not thrown when first argument to Path.of or Paths.get is null

Reviewed-by: rriggs, alanb
This commit is contained in:
Brian Burkhalter 2020-11-03 19:39:28 +00:00
parent b46d73bee8
commit 450452bb8c
3 changed files with 17 additions and 3 deletions

View file

@ -257,6 +257,7 @@ abstract class UnixFileSystem
@Override
public final Path getPath(String first, String... more) {
Objects.requireNonNull(first);
String path;
if (more.length == 0) {
path = first;