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

mandy chung mandy.chung at oracle.com
Thu Dec 7 16:31:14 UTC 2017



On 12/4/17 3:14 PM, Xueming Shen wrote:
>
> issue: https://bugs.openjdk.java.net/browse/JDK-8185582
> webrev: http://cr.openjdk.java.net/~sherman/8185582/webrev
>

ZStreamRef.java 79 static ZStreamRef get(Object owner, LongSupplier 
addr, LongConsumer end) {
It may be better to have two factory methods that take the specific type 
(Deflater & Inflater) instead of this single method taking Object owner.
ZipFile.java 701 // List of cached Inflater objects for decompression 
702 Deque<Inflater> inflaterCache;should this be a volatile field?
TestCleaner.java    27  * @summary Check the resources of Inflater, Deflater and ZipFile are always
   28  *          cleaned/released when the instane is not unreachable

typo: s/instane/instance and s/not unreachable/unreachable

Otherwise looks good.
Mandy



More information about the core-libs-dev mailing list