RFR: 8305945: (zipfs) Opening a directory to get input stream produces incorrect exception message [v4]

Eirik Bjorsnos duke at openjdk.org
Fri Apr 14 22:11:33 UTC 2023


On Fri, 14 Apr 2023 21:59:33 GMT, Lance Andersen <lancea at openjdk.org> wrote:

>> Please review this trivial change when ZipFS returns the wrong java.nio.file.FileSystemException message due the the parameters being reversed.
>> 
>> I also included a simple junit test as part of the fix.
>> 
>> Mach5 tiers1-3 are clean
>> 
>> Best
>> Lance
>
> Lance Andersen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address additional feedback

test/jdk/jdk/nio/zipfs/ZipFSDirectoryExceptionMessageTest.java line 96:

> 94:             var file = zipfs.getPath(DIRECTORY_NAME);
> 95:             var x = assertThrows(FileSystemException.class, () -> Files.newInputStream(file));
> 96:             assertEquals(x.getMessage(), DIR_EXCEPTION_MESSAGE);

JUnit asserts have the expected parameter first followed by the actual.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13482#discussion_r1167305606


More information about the core-libs-dev mailing list