Zip Extended Timestamp signedness changed in JDK9 but not JDK8

Simon Spero sesuncedu at gmail.com
Mon Jul 3 19:05:37 UTC 2017


Tracking down the cause of a JDK 9 test failure for Apache Commons Compress
under JDK 9 has revealed a change in JDK 9's handling of ZIP extended
timestamps compared to JDK8.

The issue is caused by a change in the way that extended timestamps are
converted into FileTimes.  Previously, the value was handled as a uint32 ;
however, in http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/48b296b645bd this
was changed to be int32 (with the dos  timestamp remaining unsigned).

JDK9 behavior is correct (properly supporting ZIP related Y2037 and Y2107
bugs); it's just annoying because Commons Compress had the same issue, and
it was difficult to figure out which version is correct (unless you go look
at the pkware docs).

It is strange that this wasn't backported to jdk8u, since other changes to
zip rom around the same time  are present.  Also, this fix doesn't seem to
be mentioned in JIRA or the release notes.

Simon

[Not as annoying as having finishing up a demo of RSA signed class files
right before 1.1 came out. Not that I'm bitter or anything :)]


More information about the core-libs-dev mailing list