-
Type:
CSR
-
Resolution: Withdrawn
-
Priority:
P4
-
Component/s: core-libs
-
behavioral
-
minimal
-
-
Other
-
JDK
Summary
An IllegalArgumentException may be thrown by ZipFile::getComment if there is a problem decoding the bytes representing the Zip file comment.
Problem
ZipFile::getComment may throw an IllegalArgumentException if an error occurs when decoding the bytes which represent the Zip file comment. Unfortunately the specification for ZipFile::getComment does not specify that this method may throw an Exception.
Solution
In the event of an exception when decoding the byte array that represents the Zip file comment, ZipFile::getComment will now return null instead of a spurious IllegalArgumentException.
Specification
There is no specification change in this backport CSR. The API specification of ZipFile::getComment() will not be changed. Only the implementation behavior will be changed such that ZipFile::getComment() will return null instead of throwing an IllegalArgumentException in the case of a corrupted UTF-8 byte stream.
- csr of
-
JDK-8372025 Improve the handling of invalid UTF-8 byte sequences for ZipInputStream::getNextEntry and ZipFile::getComment
-
- Closed
-
- relates to
-
JDK-8321927 Uncaught exceptions when parsing ZIP files with certain entry names or comments
-
- Closed
-