mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +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
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -211,6 +211,7 @@ class WindowsFileSystem
|
|||
|
||||
@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