--- old/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmBundler.java 2019-06-04 11:09:57.315101300 -0400 +++ new/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmBundler.java 2019-06-04 11:09:55.255848500 -0400 @@ -173,16 +173,16 @@ } @Override - public boolean validate(Map p) + public boolean validate(Map params) throws UnsupportedPlatformException, ConfigException { try { - if (p == null) throw new ConfigException( + if (params == null) throw new ConfigException( I18N.getString("error.parameters-null"), I18N.getString("error.parameters-null.advice")); // run basic validation to ensure requirements are met // we are not interested in return code, only possible exception - APP_BUNDLER.fetchFrom(p).validate(p); + APP_BUNDLER.fetchFrom(params).validate(params); // validate presense of required tools if (!testTool(TOOL_RPMBUILD, TOOL_RPMBUILD_MIN_VERSION)){ @@ -197,7 +197,7 @@ // only one mime type per association, at least one file extension List> associations = - FILE_ASSOCIATIONS.fetchFrom(p); + FILE_ASSOCIATIONS.fetchFrom(params); if (associations != null) { for (int i = 0; i < associations.size(); i++) { Map assoc = associations.get(i); @@ -220,7 +220,8 @@ // bundle name has some restrictions // the string converter will throw an exception if invalid - BUNDLE_NAME.getStringConverter().apply(BUNDLE_NAME.fetchFrom(p), p); + BUNDLE_NAME.getStringConverter().apply( + BUNDLE_NAME.fetchFrom(params), params); return true; } catch (RuntimeException re) { @@ -232,25 +233,25 @@ } } - private boolean prepareProto(Map p) + private boolean prepareProto(Map params) throws PackagerException, IOException { - File appImage = StandardBundlerParam.getPredefinedAppImage(p); + File appImage = StandardBundlerParam.getPredefinedAppImage(params); File appDir = null; // we either have an application image or need to build one if (appImage != null) { - appDir = new File(RPM_IMAGE_DIR.fetchFrom(p), - APP_NAME.fetchFrom(p)); + appDir = new File(RPM_IMAGE_DIR.fetchFrom(params), + APP_NAME.fetchFrom(params)); // copy everything from appImage dir into appDir/name IOUtils.copyRecursive(appImage.toPath(), appDir.toPath()); } else { - appDir = APP_BUNDLER.fetchFrom(p).doBundle(p, - RPM_IMAGE_DIR.fetchFrom(p), true); + appDir = APP_BUNDLER.fetchFrom(params).doBundle(params, + RPM_IMAGE_DIR.fetchFrom(params), true); } return appDir != null; } - public File bundle(Map p, + public File bundle(Map params, File outdir) throws PackagerException { if (!outdir.isDirectory() && !outdir.mkdirs()) { throw new PackagerException( @@ -263,13 +264,13 @@ outdir.getAbsolutePath()); } - File imageDir = RPM_IMAGE_DIR.fetchFrom(p); + File imageDir = RPM_IMAGE_DIR.fetchFrom(params); try { imageDir.mkdirs(); - if (prepareProto(p) && prepareProjectConfig(p)) { - return buildRPM(p, outdir); + if (prepareProto(params) && prepareProjectConfig(params)) { + return buildRPM(params, outdir); } return null; } catch (IOException ex) {