JDK-8232384 : Release Note: ZipFileInputStream::skip handling of negative values
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 14
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2019-10-16
  • Updated: 2020-06-12
  • Resolved: 2020-06-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14
14Resolved
Description
When accessing a STORED entry within a Zip file using `ZipFileInputStream`,  a negative value may be specified in order to skip backwards within the STORED entry and  a negative value is returned indicating the number of bytes skipped backwards.  If the specified value would move beyond the beginning of the file, the position is set to the beginning of the file and a negative value is returned indicating the number of bytes moved from the current position to the beginning of the file.

When accessing a DEFLATED entry within a Zip file using `ZipFileInflaterInputStream` and a negative value is specified to the skip method, an `IllegalArgumentException` will be thrown.