-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: 9
-
Component/s: core-libs
-
b42
-
Verified
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
|---|---|---|---|---|---|---|
| JDK-8084694 | emb-9 | Alan Bateman | P2 | Resolved | Fixed | team |
According to spec of java.nio.file package:
"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. Additionally, invoking a method with a collection containing a null element will cause a NullPointerException, unless otherwise specified."
if second argument passes as null of j.n.f.Files.setLastModifiedTime(Path, FileTime), NPE is not thrown:
Files.setLastModifiedTime(file.toPath(), (FileTime) null)
Tested with JDK9b35
Failed JCK test is under development.
"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. Additionally, invoking a method with a collection containing a null element will cause a NullPointerException, unless otherwise specified."
if second argument passes as null of j.n.f.Files.setLastModifiedTime(Path, FileTime), NPE is not thrown:
Files.setLastModifiedTime(file.toPath(), (FileTime) null)
Tested with JDK9b35
Failed JCK test is under development.
- backported by
-
JDK-8084694 (fs) Files.setLastModifiedTime(path, null) does not throw NPE
-
- Resolved
-