RFR: 8321616: Retire binary test vectors in test/jdk/java/util/zip/ZipFile [v7]

Eirik Bjørsnøs eirbjo at openjdk.org
Tue Jan 9 07:29:54 UTC 2024


On Mon, 18 Dec 2023 19:38:55 GMT, Lance Andersen <lancea at openjdk.org> wrote:

>> Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Merge the ReadAfterClose test into ReadZip, converting it to JUnit.
>
> test/jdk/java/util/zip/ZipFile/ReadZip.java line 233:
> 
>> 231:         URI uri = URI.create("jar:" + zip.toUri());
>> 232:         Map<String, Object> env = Map.of("create", "true", "forceZIP64End", "true");
>> 233:         try (FileSystem fs = FileSystems.newFileSystem(uri, env)) {
> 
> No Need to use a URI here

Fixed.

> test/jdk/java/util/zip/ZipFile/ReadZip.java line 257:
> 
>> 255:     @Test
>> 256:     public void readZip64EndZipProcess() throws IOException, InterruptedException {
>> 257:         if (Files.notExists(Paths.get("/usr/bin/zip"))) {
> 
> We should address this as the test won't run on Windows.  It would be better to store the zip as a byte array so that it can be processed on all platforms and by removing ProcessBuilder, the test run will speed up a bit

Updated comment to reference Info-ZIP. Updated the code to read the ZIP from a hex-encoded string.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17038#discussion_r1445712540
PR Review Comment: https://git.openjdk.org/jdk/pull/17038#discussion_r1445713213


More information about the core-libs-dev mailing list