[CAUTION] [jdk11u] RFR: 8229888: (zipfs) Updating an existing zip file does not preserve original permissions
Langer, Christoph
christoph.langer at sap.com
Tue Mar 3 07:57:46 UTC 2020
Hi Matthias,
I think you need to add "permission java.lang.RuntimePermission "accessUserInformation";" to src/java.base/share/lib/security/default.policy, grant codeBase "jrt:/jdk.zipfs". That was originally introduced by JDK-8213031: http://hg.openjdk.java.net/jdk/jdk/rev/bf325b739c8a. We see 3 test failures with your current patch which should hopefully be resolved by that.
As for refactoring regarding the missing java.nio.file.FileSystems.newFileSystem(Path path, Map<String,?> env) API in JDK11, I suggest you use zipFile.toUri() as was done in this backport already: http://hg.openjdk.java.net/jdk-updates/jdk11u/rev/f8b2e95a1d41. That way you'll avoid the need for the helper method " public static FileSystem newFileSystem(Path path, Map<String,?> env)" that you introduced in ZipFSPermissionsTest.
Best regards
Christoph
> -----Original Message-----
> From: jdk-updates-dev <jdk-updates-dev-bounces at openjdk.java.net> On
> Behalf Of Baesken, Matthias
> Sent: Freitag, 28. Februar 2020 09:53
> To: jdk-updates-dev at openjdk.java.net
> Subject: [CAUTION] [jdk11u] RFR: 8229888: (zipfs) Updating an existing zip
> file does not preserve original permissions
>
> Hello, please review the downport of
> 8229888: (zipfs) Updating an existing zip file does not preserve original
> permissions
>
> to jdk11u. The change is in 11.0.7-oracle so it would be good to have it in
> OpenJDK 11 as well.
>
> The change touches
> src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java and test related
> files.
> I had to add imports to ZipFileSystem.java, and had to adjust the test file
> test/jdk/jdk/nio/zipfs/ZipFSPermissionsTest.java
> because jdk11 misses java.nio.file.FileSystems.newFileSystem(Path path,
> Map<String,?> env) .
>
>
> bug :
> https://bugs.openjdk.java.net/browse/JDK-8229888
>
>
> original jdk/jdk change :
> https://hg.openjdk.java.net/jdk/jdk/rev/798c0903fcd0
>
>
> adjusted jdk11u change :
> http://cr.openjdk.java.net/~mbaesken/webrevs/8229888_0_jdk11/
>
>
> Thanks, Matthias
More information about the jdk-updates-dev
mailing list