RFR: JDK-8262435: Clarify the behavior of a few inherited ZipInputStream methods

Lance Andersen lancea at openjdk.org
Thu Nov 10 18:47:29 UTC 2022


On Mon, 7 Nov 2022 10:08:16 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> src/java.base/share/classes/java/util/zip/ZipInputStream.java line 210:
>> 
>>> 208:      * Reads all remaining bytes from the input stream for the current ZIP entry.
>>> 209:      * This method blocks until all remaining bytes have been read and end of
>>> 210:      * stream is detected, or an exception is thrown. This method does not close
>> 
>> Hello Lance, the part where it says that it reads the current ZIP entry sounds fine. However, this also states that it will wait until the end of stream is detected. Should we make it clearer by changing this to say `This method blocks until all remaining bytes of the entry have been read or an exception is thrown`?
>
> Similar comment for the other `readNBytes` and skip methods.

Hi Jai,

Thank you for your input above.  I had thought about that but decided it would be best to keep the changes at a minimum from InputStream and felt given the change of the first sentence the rest of the wording is in regards to the current ZIP Entry

-------------

PR: https://git.openjdk.org/jdk/pull/10995


More information about the core-libs-dev mailing list