RFR: JDK-8241883: (zipfs) SeekableByteChannel:close followed by SeekableByteChannel:close will throw an NPE
Lance Andersen
lance.andersen at oracle.com
Thu Apr 9 18:20:00 UTC 2020
> On Apr 9, 2020, at 3:03 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
>>
>> In the case of the close method above, ByteArrayChannel::toByteArray uses a readLock ByteArrayChannel::close uses a writeLock
>>
> The patch adds a new lock and doesn't appear use the readLock. Would it be possible to generate a webrev with the full patch as it's not possible to see the fully implications of what is proposed here.
Of course, and can be found at: http://cr.openjdk.java.net/~lancea/8241883/webrev.00/index.html <http://cr.openjdk.java.net/~lancea/8241883/webrev.00/index.html>
I modified the patch to use the beginWrite() from ByteArrayChannel per Christoph’s suggestion (I had done that originally but talked myself out of that for some reason …)
>
> -Alan
<http://oracle.com/us/design/oracle-email-sig-198324.gif>
<http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
<http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200409/94906767/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oracle_sig_logo.gif
Type: image/gif
Size: 658 bytes
Desc: not available
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200409/94906767/oracle_sig_logo.gif>
More information about the nio-dev
mailing list