--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java Sun Jan 06 16:58:28 2019 -0500
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java Mon Jan 07 16:39:30 2019 -0500
@@ -173,28 +173,6 @@
} catch (IOException ex) {
Log.verbose(ex);
return null;
- } finally {
- try {
- if (appImageDir != null &&
- PREDEFINED_APP_IMAGE.fetchFrom(params) == null &&
- (PREDEFINED_RUNTIME_IMAGE.fetchFrom(params) == null ||
- !Arguments.CREATE_JRE_INSTALLER.fetchFrom(params)) &&
- !Log.isDebug() &&
- !Log.isVerbose()) {
- IOUtils.deleteRecursive(appImageDir);
- } else if (appImageDir != null) {
- Log.verbose(MessageFormat.format(I18N.getString(
- "message.intermediate-image-location"),
- appImageDir.getAbsolutePath()));
- }
-
- // cleanup
- cleanupConfigFiles(params);
- } catch (IOException ex) {
- Log.debug(ex);
- // noinspection ReturnInsideFinallyBlock
- return null;
- }
}
}
@@ -208,19 +186,6 @@
APP_FS_NAME.fetchFrom(params) + "-daemon.pkg");
}
- private void cleanupPackagesFiles(Map<String, ? super Object> params) {
- if (Log.isDebug() || Log.isVerbose()) {
- return;
- }
-
- if (getPackages_AppPackage(params) != null) {
- getPackages_AppPackage(params).delete();
- }
- if (getPackages_DaemonPackage(params) != null) {
- getPackages_DaemonPackage(params).delete();
- }
- }
-
private File getConfig_DistributionXMLFile(
Map<String, ? super Object> params) {
return new File(CONFIG_ROOT.fetchFrom(params), "distribution.dist");
@@ -240,19 +205,6 @@
return new File(SCRIPTS_DIR.fetchFrom(params), "postinstall");
}
- private void cleanupConfigFiles(Map<String, ? super Object> params) {
- if (Log.isDebug() || Log.isVerbose()) {
- return;
- }
-
- if (getConfig_DistributionXMLFile(params) != null) {
- getConfig_DistributionXMLFile(params).delete();
- }
- if (getConfig_BackgroundImage(params) != null) {
- getConfig_BackgroundImage(params).delete();
- }
- }
-
private String getAppIdentifier(Map<String, ? super Object> params) {
return IDENTIFIER.fetchFrom(params);
}
@@ -452,9 +404,6 @@
} catch (Exception ignored) {
Log.verbose(ignored);
return null;
- } finally {
- cleanupPackagesFiles(params);
- cleanupConfigFiles(params);
}
}