TKit.createTempFile() [1] allows the creation of a unique file in the root test work directory only, and TKit.createTempDirectory() [2] can create a directory in the subdirectory inside of the test work directory.
It would be better to have these functions unified. Also, remove `throws IOEXception` from their signatures - wrap java.io.IOException-s in java.io.UncheckedIOException-s.
Make TKit.assertDirectoryExists(Path, Optional<Boolean>) [3] private. It is internal and shouldn't be exposed.
Add a check for the main jar in the app image if the main jar was specified to JPackageCommand class. This is a missing part ofJDK-8325089.
[1] https://github.com/openjdk/jdk/blob/65f79c145b7b1b32ed064a37ad4d2b6aca935a4c/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java#L330
[2] https://github.com/openjdk/jdk/blob/65f79c145b7b1b32ed064a37ad4d2b6aca935a4c/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java#L323
[3] https://github.com/openjdk/jdk/blob/65f79c145b7b1b32ed064a37ad4d2b6aca935a4c/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java#L706
It would be better to have these functions unified. Also, remove `throws IOEXception` from their signatures - wrap java.io.IOException-s in java.io.UncheckedIOException-s.
Make TKit.assertDirectoryExists(Path, Optional<Boolean>) [3] private. It is internal and shouldn't be exposed.
Add a check for the main jar in the app image if the main jar was specified to JPackageCommand class. This is a missing part of
[1] https://github.com/openjdk/jdk/blob/65f79c145b7b1b32ed064a37ad4d2b6aca935a4c/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java#L330
[2] https://github.com/openjdk/jdk/blob/65f79c145b7b1b32ed064a37ad4d2b6aca935a4c/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java#L323
[3] https://github.com/openjdk/jdk/blob/65f79c145b7b1b32ed064a37ad4d2b6aca935a4c/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java#L706
- links to
-
Commit(master) openjdk/jdk/2efb0336
-
Review(master) openjdk/jdk/23754