On Fri, 17 Jun 2022 04:07:47 GMT, Alexander Matveev <almat...@openjdk.org> wrote:
>> - Error will be thrown if app image is generated with another JDK version or >> has malformed .jpackage.xml. >> - Re-fixed as Alexey suggested in >> https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/9098__;!!ACWV5N9M2RV99hQ!If66npa4KIXhh8J0EMMtHPhW-ElCNHLu8weh3DrMRm9S7IeBSkWI4Plcggx6hrN4-M0mANwjXSt1fa4yrIcbKyRziQg$ >> . > > Alexander Matveev has updated the pull request incrementally with one > additional commit since the last revision: > > 8287971: Throw exception for missing values in .jpackage.xml [v3] Changes requested by asemenyuk (Reviewer). test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java line 307: > 305: if (appImage == null) { > 306: throw new RuntimeException("Error: --app-image expected"); > 307: } Can be simplified to: Path jpackageXMLFile = AppImageFile.getPathInAppImage( Optional.ofNullable(getArgumentValue("--app-image")).map( Path::of).orElseThrow(() -> { return new RuntimeException( "Error: --app-image expected"); })); And you don't need copy/paste code from `AppImageFile.getPathInAppImage()` below. ------------- PR: https://git.openjdk.org/jdk19/pull/9