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

Andrew Hughes gnu.andrew at redhat.com
Wed May 27 18:12:23 UTC 2020



On 25/05/2020 20:48, Alex Kashchenko wrote:
> On 04/04/2020 12:28 PM, Alex Kashchenko wrote:
>> On 04/02/2020 04:46 AM, Andrew Hughes wrote:
>>> 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);
>>>      }
>>
>> Thanks for the review! I simplified this part of test removing
>> createSet() helper:
>>
>> https://cr.openjdk.java.net/~akasko/jdk8u/8229888/webrev.01/
>>
>>>
>>> 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.
>>
>> AFAIU these changes to policy file are only necessary for jdk9+ with
>> JPMS, some details on this policy change in jdk11:
>>
>> https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-March/002644.html
>>
>>
>> https://mail.openjdk.java.net/pipermail/nio-dev/2019-March/005978.html
> 
> Gentle reminder.
> 

This was fine and went into b03:

https://mail.openjdk.java.net/pipermail/jdk8u-dev/2020-May/011767.html

Sorry, I thought I'd replied with a thumbs up before approving and
pushing. That makes two e-mails that seem to have vanished into the
ether around that time :/
-- 
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