RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v6]
Eirik Bjorsnos
duke at openjdk.org
Mon Apr 3 13:41:52 UTC 2023
On Fri, 31 Mar 2023 19:59:10 GMT, Eirik Bjorsnos <duke at openjdk.org> wrote:
>> CorruptedZipFiles could benefit from some spring cleaning and a conversion to junit:
>>
>> - The actual tests are moved into their own `@Test` methods, given more meaningful names and a Javadoc comment explaining the constraint being verified
>> - The setup code is moved to a `@Before` method, slightly modernized and rewritten to take advantage of `assertEquals`
>> - `checkZipExceptionImpl` is updated to take advantage of `assertThrows`
>> - A bunch of constants copied over from `ZipFile` can be deleted since JDK-6225935 has long been fixed
>
> Eirik Bjorsnos has updated the pull request incrementally with four additional commits since the last revision:
>
> - Remove the "Validate that " comment prefix
> - Spell immediately correctly
> - a A -> a
> - this -> the
Updated the `excessiveCENOffset` comment to say just _A ZipException is thrown when the 'End of Central Directory'(END) header has a CEN offset with an invalid value_.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/12563#issuecomment-1494337042
More information about the core-libs-dev
mailing list