RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries
Eirik Bjorsnos
duke at openjdk.org
Fri Mar 24 08:12:41 UTC 2023
On Thu, 2 Feb 2023 12:57:15 GMT, Eirik Bjorsnos <duke at openjdk.org> 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: fail("Expected ZipFile to throw ZipException");
>>
>> You could consider using expectThrows and then validation the value of getMessage()
>
> Replaced with expectedExceptions and expectedExceptionsMessageRegExp
Now that I finally understand what you meant by this, I've update to use expectThrows and assertEquals :-)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12231#discussion_r1105861315
More information about the core-libs-dev
mailing list