Duplicate :
|
|
Duplicate :
|
|
Relates :
|
(This is a tck-red/conformance clone of JDK-8065536) Spec for the methods http://docs.oracle.com/javase/8/docs/api/java/util/zip/ZipEntry.html#setCreationTime-java.nio.file.attribute.FileTime- http://docs.oracle.com/javase/8/docs/api/java/util/zip/ZipEntry.html#setLastAccessTime-java.nio.file.attribute.FileTime- says: "Throws: NullPointerException - if the time is null" However the implementation doesn't satisfy this assertion, the following code will produce no exceptions: new ZipEntry("entry").setCreationTime(null); new ZipEntry("entry").setLastAccessTime(null); new JarEntry("entry").setCreationTime(null); new JarEntry("entry").setLastAccessTime(null); The following JCK9 tests will fail due to this: api/java_util/jar/JarEntry/autd2.html#CreationTime[nullCreationTime] api/java_util/jar/JarEntry/autd2.html#LastAccessTime[nullCreationTime] api/java_util/zip/ZipEntry/autd2.html#LastAccessTime[nullCreationTime] api/java_util/zip/ZipEntry/autd2.html#CreationTime[nullCreationTime]