Re: RFR JDK-8185582, Update Zip implementation to use Cleaner, not finalizers

2017-10-28 Thread Florian Weimer
* Xueming Shen: > It might be possible to try-catch to expect Cleaner.register might > fail, but I doubt it's really necessary here and it is the > recommended usage of Cleaner? That is actually why I posted this. 8-) For similar functionality in other languages, it is often necessary to perform

Re: RFR JDK-8185582, Update Zip implementation to use Cleaner, not finalizers

2017-10-28 Thread Xueming Shen
On 10/28/17, 10:47 AM, Peter Levart wrote: Hi Florian, On 10/28/17 16:16, Florian Weimer wrote: * Xueming Shen: https://bugs.openjdk.java.net/browse/JDK-8187485 http://cr.openjdk.java.net/~sherman/8185582/webrev In ZipFile: 387 Inflater inf = getInflater(); 388

Re: JDK-8067661: transferTo proposal for Appendable

2017-10-28 Thread Roger Riggs
Hi Patrick, Sounds like a good idea to me. Do you have any suggestions for concrete implementations that may benefit from specialized implementations? As a 'push' API, an implementation will necessarily have to allocate a buffer and read characters and then append them to the appendable.  I

Re: RFR JDK-8185582, Update Zip implementation to use Cleaner, not finalizers

2017-10-28 Thread Peter Levart
Hi Florian, On 10/28/17 16:16, Florian Weimer wrote: * Xueming Shen: https://bugs.openjdk.java.net/browse/JDK-8187485 http://cr.openjdk.java.net/~sherman/8185582/webrev In ZipFile: 387 Inflater inf = getInflater(); 388 InputStream is = new ZipFileInflaterInput

Re: RFR JDK-8185582, Update Zip implementation to use Cleaner, not finalizers

2017-10-28 Thread Xueming Shen
On 10/28/17, 7:16 AM, Florian Weimer wrote: * Xueming Shen: I removed the ln#657-#663, and updated the @apiNote in deflter, inflater and zipfile accordingly, mainly combined your comment and the approach for the fis/fo. they are "simpler" and straightforward now, at least for me. https://bugs.

Re: RFR JDK-8185582, Update Zip implementation to use Cleaner, not finalizers

2017-10-28 Thread Florian Weimer
* Xueming Shen: > I removed the ln#657-#663, and updated the @apiNote in deflter, inflater > and zipfile accordingly, mainly combined your comment and the approach > for the fis/fo. they are "simpler" and straightforward now, at least for me. > > https://bugs.openjdk.java.net/browse/JDK-8187485 >

JDK-8067661: transferTo proposal for Appendable

2017-10-28 Thread Patrick Reinhart
Hi There, Based on the *transferTo* Method on the InputStream I would propose to introduce a default method on the Readable interface. In that way the method can be used for all existing implementations of Readable and still be implemented in a special way by a individual implementer.    /**