Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v4]

2023-03-26 Thread Martin Buchholz
On Sat, 25 Mar 2023 12:18:46 GMT, Eirik Bjorsnos wrote: >> So I changed the references to this ultimate ZIP structure to read like this: >> >> 'End of central directory record' (END header) >> >> Example: >> >> >> /** >> * Validate that an 'End of central directory record' (END header) >

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v4]

2023-03-26 Thread Martin Buchholz
On Sat, 25 Mar 2023 12:12:21 GMT, Eirik Bjorsnos wrote: >> The TestTooManyEntries test was originally added to validate that ZIP64 >> files with CEN sizes exceeding what ZipFile supports are rejected with a >> ZipException. The test does this by creating a large ZIP file (several >> gigabytes

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v4]

2023-03-26 Thread Eirik Bjorsnos
On Sun, 26 Mar 2023 16:51:28 GMT, Martin Buchholz wrote: >> So, what I would suggest is adding a comment somewhere regarding _end of >> central directory record_ and note the reference to _ENDHDR_ or _END Header_ >> >> I don't think you want to spend too much time here just the wording >> refe

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v4]

2023-03-26 Thread Martin Buchholz
On Sat, 25 Mar 2023 10:59:36 GMT, Lance Andersen wrote: >> If by "standard" you mean "APPNOTE.TXT", then that uses "end of central >> directory record" which is a bit long. >> >> The Java implementation seems to use END, like in `ZipFile.ENDHDR`, "END >> header", etc. >> >> It is probably bet

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v4]

2023-03-25 Thread Eirik Bjorsnos
On Sat, 25 Mar 2023 12:12:21 GMT, Eirik Bjorsnos wrote: >> The TestTooManyEntries test was originally added to validate that ZIP64 >> files with CEN sizes exceeding what ZipFile supports are rejected with a >> ZipException. The test does this by creating a large ZIP file (several >> gigabytes

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v4]

2023-03-25 Thread Lance Andersen
On Sat, 25 Mar 2023 12:12:21 GMT, Eirik Bjorsnos wrote: >> The TestTooManyEntries test was originally added to validate that ZIP64 >> files with CEN sizes exceeding what ZipFile supports are rejected with a >> ZipException. The test does this by creating a large ZIP file (several >> gigabytes

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v4]

2023-03-25 Thread Eirik Bjorsnos
On Sat, 25 Mar 2023 12:11:18 GMT, Eirik Bjorsnos wrote: >>> I hear you but the option is not to use javadoc comments and use block >>> comments :-) >> >> I learned something new today: Javadoc comments and block comments are not >> the same! > > So I changed the references to this ultimate ZIP

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v4]

2023-03-25 Thread Eirik Bjorsnos
On Sat, 25 Mar 2023 11:55:44 GMT, Eirik Bjorsnos wrote: >>> I think the PR is ready to be sponsored after this. >> >> Please see my comment regarding the end of central directory record. >> >> I would prefer to tweak that in a fashion similar to what I indicated as I >> thought your original

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v4]

2023-03-25 Thread Eirik Bjorsnos
> The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) with many enties. Because this is resource intensive, the te

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v3]

2023-03-25 Thread Lance Andersen
On Sat, 25 Mar 2023 11:18:32 GMT, Lance Andersen wrote: >> Thanks, I've added `@throws IOException if an error occurs` to all methods >> throwing `IOException`. >> >> For the record, let me state my personal (rather strong) opinion: >> >> I think this a pretty crazy level of boilerplate noise

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v3]

2023-03-25 Thread Eirik Bjorsnos
On Sat, 25 Mar 2023 11:23:01 GMT, Lance Andersen wrote: >> I hear you but the option is not to use javadoc comments and use block >> comments :-) >> >> I think we can agree to disagree on impacting readability ;-) this comes >> down to personal preferences >> >> Again thank you for making th

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v3]

2023-03-25 Thread Lance Andersen
On Sat, 25 Mar 2023 11:07:24 GMT, Eirik Bjorsnos wrote: >> Please add them back before pushing with `@throws IOException if an error >> occurs` >> >> Yes I understand they do not add much value but it will reduce noise from >> IDEs and if/when we add more checks for missing javadoc tags, it wi

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v3]

2023-03-25 Thread Lance Andersen
On Sat, 25 Mar 2023 06:46:22 GMT, Eirik Bjorsnos wrote: >> test/jdk/java/util/zip/ZipFile/EndOfCenValidation.java line 120: >> >>> 118: /** >>> 119: * Validate that an end of central directory record with a >>> 120: * CEN size which exceeds the position of the EOC record is >>> re

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v3]

2023-03-25 Thread Eirik Bjorsnos
> The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) with many enties. Because this is resource intensive, the te

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v3]

2023-03-25 Thread Eirik Bjorsnos
On Sat, 25 Mar 2023 10:47:20 GMT, Lance Andersen wrote: >> I recently added a `@throws` by review comment from Lance. I tend to agree >> that is not very useful, so I'm removing both ocurrences as per your >> recommendation. >> >> If Lance wants it back, he can add a review comment saying so.

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v2]

2023-03-25 Thread Lance Andersen
On Sat, 25 Mar 2023 06:50:16 GMT, Eirik Bjorsnos wrote: >> test/jdk/java/util/zip/ZipFile/EndOfCenValidation.java line 139: >> >>> 137: * Validate that an end of central directory record with a CEN >>> offset which >>> 138: * is larger than the EOC position minus the CEN size is rejec

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v2]

2023-03-24 Thread Eirik Bjorsnos
On Fri, 24 Mar 2023 16:36:46 GMT, Lance Andersen wrote: >> Eirik Bjorsnos has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove @throws as per review feedback >> - Consistently use the term "END header" when referring to the "End o

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v2]

2023-03-24 Thread Eirik Bjorsnos
On Fri, 24 Mar 2023 18:30:26 GMT, Martin Buchholz wrote: >> Eirik Bjorsnos has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove @throws as per review feedback >> - Consistently use the term "END header" when referring to the "End

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v2]

2023-03-24 Thread Eirik Bjorsnos
On Fri, 24 Mar 2023 18:28:36 GMT, Martin Buchholz wrote: >> Eirik Bjorsnos has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove @throws as per review feedback >> - Consistently use the term "END header" when referring to the "End

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v2]

2023-03-24 Thread Eirik Bjorsnos
> The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) with many enties. Because this is resource intensive, the te

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v2]

2023-03-24 Thread Eirik Bjorsnos
On Fri, 24 Mar 2023 18:26:02 GMT, Martin Buchholz wrote: >> Eirik Bjorsnos has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove @throws as per review feedback >> - Consistently use the term "END header" when referring to the "End

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Martin Buchholz
On Thu, 26 Jan 2023 18:49:47 GMT, Eirik Bjorsnos wrote: > The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) wi

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Eirik Bjorsnos
On Thu, 26 Jan 2023 18:49:47 GMT, Eirik Bjorsnos wrote: > The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) wi

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Lance Andersen
On Thu, 26 Jan 2023 18:49:47 GMT, Eirik Bjorsnos wrote: > The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) wi

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Eirik Bjorsnos
On Fri, 24 Mar 2023 12:25:55 GMT, Lance Andersen wrote: >> Sparse files need to be created as such. The purpose of this delete exists >> to make this explicit. I moved this closer to the FileChannel.open and added >> a comment to explain the delete. > > I am fine leaving it, but still not convi

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Lance Andersen
On Fri, 24 Mar 2023 08:05:19 GMT, Eirik Bjorsnos wrote: >> test/jdk/java/util/zip/ZipFile/EndOfCenValidation.java line 177: >> >>> 175: Path zip) throws IOException >>> { >>> 176: >>> 177: Files.deleteIfExists(zip); >> >> Is this needed? I th

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Lance Andersen
On Thu, 26 Jan 2023 18:49:47 GMT, Eirik Bjorsnos wrote: > The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) wi

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Eirik Bjorsnos
On Thu, 2 Feb 2023 12:57:15 GMT, Eirik Bjorsnos wrote: >> test/jdk/java/util/zip/ZipFile/CenSizeTooLarge.java line 92: >> >>> 90: private void assertRejected(Path zip, String expectedMsg) throws >>> IOException { >>> 91: try (ZipFile zf = new ZipFile(zip.toFile())) { >>> 92:

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Eirik Bjorsnos
On Tue, 31 Jan 2023 11:38:07 GMT, Lance Andersen wrote: >> The TestTooManyEntries test was originally added to validate that ZIP64 >> files with CEN sizes exceeding what ZipFile supports are rejected with a >> ZipException. The test does this by creating a large ZIP file (several >> gigabytes

RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Eirik Bjorsnos
The TestTooManyEntries test was originally added to validate that ZIP64 files with CEN sizes exceeding what ZipFile supports are rejected with a ZipException. The test does this by creating a large ZIP file (several gigabytes) with many enties. Because this is resource intensive, the test is c

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Lance Andersen
On Thu, 26 Jan 2023 18:49:47 GMT, Eirik Bjorsnos wrote: > The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) wi