Zip filesystem provider in JDK 8u75: does it violate the contract for BasicFileAttributes' .creationTime()?

Francis Galiegue fgaliegue at gmail.com
Mon Feb 22 11:25:36 UTC 2016


The .creationTime() of any Path from a zip-backed FileSystem returns null.

The doc of all FileTime returning methods of the interface says that:

----
If the file system implementation does not support a time stamp to
indicate the time of <xxxx> then this method returns an implementation
specific default value, typically a FileTime representing the epoch
(1970-01-01T00:00:00Z).
----

There _is_ a method of these attributes which can explicitly return
null (.fileKey()), but not this one.

Is this a violation?

-- 
Francis Galiegue, fgaliegue at gmail.com, https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa


More information about the nio-dev mailing list