RFR: 8267056: tools/jpackage/share/RuntimePackageTest.java fails with NoSuchFileException [v2]

Alexander Matveev almatvee at openjdk.java.net
Thu May 20 22:25:14 UTC 2021


On Thu, 20 May 2021 16:15:21 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:

>> Alexander Matveev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8267056: tools/jpackage/share/RuntimePackageTest.java fails with NoSuchFileException [v2]
>
> src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java line 396:
> 
>> 394:         // if parent does not have any other files
>> 395:         if (!StandardBundlerParam.isRuntimeInstaller(params)) {
>> 396:             Path[] list = Files.list(rootDir).toArray(Path[]::new);
> 
> `Files.list()` requires try-with-resources construct.

Fixed. I also removed check for null, since I do not think that Files.list can return null. I think it was leftover when we used File APIs instead of Files.

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

PR: https://git.openjdk.java.net/jdk/pull/4120


More information about the core-libs-dev mailing list