+{"files":[{"patch":"@@ -333,1 +333,1 @@\n- static String getVersion() {\n+ public static String getVersion() {\n@@ -337,1 +337,1 @@\n- static String getPlatform() {\n+ public static String getPlatform() {\n","filename":"src\/jdk.jpackage\/share\/classes\/jdk\/jpackage\/internal\/AppImageFile.java","additions":2,"deletions":2,"binary":false,"changes":4,"status":"modified"},{"patch":"@@ -304,21 +304,6 @@\n- String appImage = getArgumentValue(\"--app-image\");\n- if (appImage == null) {\n- throw new RuntimeException(\"Error: --app-image expected\");\n- }\n-\n- final String version = System.getProperty(\"java.version\");\n- final String platform;\n-\n- if (TKit.isWindows()) {\n- platform = \"windows\";\n- } else if (TKit.isLinux()) {\n- platform = \"linux\";\n- } else if (TKit.isOSX()) {\n- platform = \"macOS\";\n- } else {\n- platform = \"unknown\";\n- }\n-\n- ApplicationLayout layout = ApplicationLayout.platformAppImage();\n- Path jpackageXMLFile = layout.resolveAt(Path.of(appImage))\n- .appDirectory().resolve(\".jpackage.xml\");\n+ Path jpackageXMLFile = AppImageFile.getPathInAppImage(\n+ Optional.ofNullable(getArgumentValue(\"--app-image\")).map(\n+ Path::of).orElseThrow(() -> {\n+ return new RuntimeException(\n+ \"Error: --app-image expected\");\n+ }));\n@@ -328,2 +313,2 @@\n- xml.writeAttribute(\"version\", version);\n- xml.writeAttribute(\"platform\", platform);\n+ xml.writeAttribute(\"version\", AppImageFile.getVersion());\n+ xml.writeAttribute(\"platform\", AppImageFile.getPlatform());\n","filename":"test\/jdk\/tools\/jpackage\/helpers\/jdk\/jpackage\/test\/JPackageCommand.java","additions":8,"deletions":23,"binary":false,"changes":31,"status":"modified"}]}
0 commit comments