mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
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:
parent
b46d73bee8
commit
450452bb8c
3 changed files with 17 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue