[8u] RFR: 8229888: (zipfs) Updating an existing zip file does not preserve original permissions

Andrew Hughes gnu.andrew at redhat.com
Thu Apr 2 03:46:54 UTC 2020



On 26/03/2020 23:15, Alex Kashchenko wrote:
> Hi,
> 
> Please review the backport of JDK-8229888 to 8u:
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8229888
> 
> Original review thread:
> http://mail.openjdk.java.net/pipermail/nio-dev/2019-December/006894.html
> 
> 11u changeset:
> https://hg.openjdk.java.net/jdk-updates/jdk11u/rev/57fd597352b8
> 
> 8u webrev: http://cr.openjdk.java.net/~akasko/jdk8u/8229888/webrev.00/
> 
> 8u patch is very close to 11u one: ZipFileSystem part is the same, test
> is changed to replace API not available in 8u, changes to policy file
> are not included.
> 

It would be helpful if you could explain why such changes had to be
made, rather than leaving the reviewer to guess.

The test changes are fairly clear, though the replacement for Set.of,
createSet, returns a modifiable set, whereas of returns an unmodifiable
set. This doesn't really matter for a test case, but may in JDK code.

It could also potentially be simplified to just:

    private static Set<Object> createSet(Object... entries) {
	Set<Object> set = new LinkedHashSet<>(Arrays.asList(entries));
	return Collections.unmodifiableSet(set);
    }

I'm not sure why the policy file change is unnecessary. I would guess
it's because the zipfs code is only demo code in 8u, but it would be
good to have more reassurance.

Thanks,
-- 
Andrew :)

Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222



More information about the jdk8u-dev mailing list