RFR: 8254876: (fs) NullPointerException not thrown when first argument to Path.of or Paths.get is null [v3]
Alan Bateman
alanb at openjdk.java.net
Tue Nov 3 07:12:57 UTC 2020
On Tue, 3 Nov 2020 02:31:06 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Please review this simple fix to have Path.of(String,String) throw a NullPointerException if the first parameter is null.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8254876: (fs) NullPointerException not thrown when first argument to Path.of or Paths.get is null
Marked as reviewed by alanb (Reviewer).
test/jdk/java/nio/file/Path/PathOps.java line 2050:
> 2048: } catch (NullPointerException npe) {
> 2049: }
> 2050:
Probably should test Path.of("foo", null) too, just so we have tests for null at the first and second parameter in the same test.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1020
More information about the nio-dev
mailing list