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

Alexey Semenyuk asemenyuk at openjdk.java.net
Thu May 20 16:19:28 UTC 2021


On Wed, 19 May 2021 21:00:07 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:

> For debug build on macOS, runtime which used for test fill be located in /path/jdk-17/fastdebug and /path/jdk-17 will not contain any other files except fastdebug and in this case our check to decide if we need to copy app or runtime will return /path/jdk-17 which is not correct. Fixed by skipping this check for runtime and only using it for app. Also, added ignoring .DS_Store to test which is needed if user used Finder to look inside runtime folder which will cause .DS_Store to be created and will cause test to fail, since this file is not being packaged.

Changes requested by asemenyuk (Reviewer).

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.

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

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


More information about the core-libs-dev mailing list