Re: RFR: 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream [v8]

2021-07-22 Thread Jaikiran Pai
Hello Bernd, On 22/07/21 8:54 pm, Bernd Eckenfels wrote: Hello, So although you can transfer the contents to the file without requiring the access to the byte array, you end up creating a new copy of that array (through the use of `baos.toByteArray()`) You can avoid the copy and the

Re: RFR: 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream [v8]

2021-07-22 Thread Bernd Eckenfels
Hello, > So although you can transfer the contents to the file without requiring the > access > to the byte array, you end up creating a new copy of that array (through the > use > of `baos.toByteArray()`) You can avoid the copy and the additional buffer with baos.writeTo() I think. try

Re: RFR: 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream [v8]

2021-07-22 Thread Jaikiran Pai
On Wed, 21 Jul 2021 04:09:23 GMT, Jaikiran Pai wrote: > > > For some context - the new `FileRolloverOutputStream` extends > > > `ByteArrayOutputStream` and hence cannot have a `throws IOException` in > > > its overridden `write` methods. > > > > > > Have you tried wrapping a BAOS rather than

Re: RFR: 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream [v8]

2021-07-11 Thread Jaikiran Pai
On 12/07/21 2:08 am, Lance Andersen wrote: On Mon, 5 Jul 2021 07:42:26 GMT, Jaikiran Pai wrote: Can I please get a review for this proposed fix for the issue reported in https://bugs.openjdk.java.net/browse/JDK-8190753? The commit here checks for the size of the zip entry before trying to

Re: RFR: 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream [v8]

2021-07-11 Thread Lance Andersen
On Mon, 5 Jul 2021 07:42:26 GMT, Jaikiran Pai wrote: >> Can I please get a review for this proposed fix for the issue reported in >> https://bugs.openjdk.java.net/browse/JDK-8190753? >> >> The commit here checks for the size of the zip entry before trying to create >> a

Re: RFR: 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream [v8]

2021-07-05 Thread Jaikiran Pai
> Can I please get a review for this proposed fix for the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8190753? > > The commit here checks for the size of the zip entry before trying to create > a `ByteArrayOutputStream` for that entry's content. A new jtreg test has been >