[jdk11u-dev] RFR: 8242882: opening jar file with large manifest might throw NegativeArraySizeException

Aleksey Shipilev shade at openjdk.java.net
Wed Aug 11 07:36:02 UTC 2021


Unclean backport to match `11.0.13-oracle`. The uncleanliness is due to ambuity in `JarUtils.createJarFile` that does not have the overload with just `(Path, Path)`, as it was added in later JDKs. I added the `Paths.get(".")` to do the same thing.


        JarUtils.createJarFile(jarFilePath.toAbsolutePath(), jarSourceRoot, Paths.get("."));


Additional testing:
 - [x] New test fails without the patch
 - [x] New test passes with the patch

-------------

Commit messages:
 - Backport 782d45bdec6efdb7e689e0839718ecd7bac2c767

Changes: https://git.openjdk.java.net/jdk11u-dev/pull/225/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk11u-dev&pr=225&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8242882
  Stats: 85 lines in 2 files changed: 84 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk11u-dev/pull/225.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk11u-dev pull/225/head:pull/225

PR: https://git.openjdk.java.net/jdk11u-dev/pull/225


More information about the jdk-updates-dev mailing list