RFR (S): 8215472: Cleanups in implementation classes of jdk.zipfs and tests

Lance Andersen lance.andersen at oracle.com
Mon Dec 17 20:03:27 UTC 2018


HI Christoph
> On Dec 17, 2018, at 5:38 AM, Claes Redestad <claes.redestad at oracle.com> wrote:
> 
> Hi Christoph,
> 
> I believe the convention in the OpenJDK sources is to sort static
> imports after non-static, so changing to the other way around in a few
> places adds inconsistencies.
> 
> In ZipFileSystem you remove the unused method releaseDeflater - to me
> this indicates the resource pooling is actually broken? I.e., shouldn't
> EntryOutputStreamDef return its Deflater to the cache when it's closed,
> similar to how the anonymous InflaterInputStream in getInputStream does
> it? As it's currently implemented the deflaters list will always be
> empty and no Deflater returned, so could go the other way and remove
> that cache if caching Deflaters isn't useful.

Yes I would leave this for now, make a note to look at this further and deal with it separate from this change

Also in ZipFileSystem,  I would instead of removing line 2115, I would either keep it and remove the other references to version() in writeLOC, or make the change in  writeCEN so that the usage of version is consistent.

Best
Lance
> 
> Otherwise looks good to me.
> 
> /Claes
> 
> On 2018-12-17 09:28, Langer, Christoph wrote:
>> Hi,
>> when working with jdk.zipfs, I found some opportunity for cleanups. I'd like to contribute this independently from my other thread regarding Posix permissions in zip files (http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-November/056426.html). So, please help to review the cleanup.
>> Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8215472.0/
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8215472
>> Thanks
>> Christoph

 <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>





More information about the core-libs-dev mailing list