Skip to content

Commit

Permalink
migrate CliFrontend to PackagedProgram#close
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Jan 29, 2021
1 parent ce3c983 commit c833d99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,8 @@ protected void run(String[] args) throws Exception {

LOG.debug("Effective executor configuration: {}", effectiveConfiguration);

final PackagedProgram program = getPackagedProgram(programOptions, effectiveConfiguration);

try {
try (PackagedProgram program = getPackagedProgram(programOptions, effectiveConfiguration)) {
executeProgram(effectiveConfiguration, program);
} finally {
program.deleteExtractedLibraries();
}
}

Expand Down Expand Up @@ -387,7 +383,7 @@ protected void info(String[] args) throws Exception {
}
} finally {
if (program != null) {
program.deleteExtractedLibraries();
program.close();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public static List<URL> getJobJarAndDependencies(
}

/** Deletes all temporary files created for contained packaged libraries. */
public void deleteExtractedLibraries() {
private void deleteExtractedLibraries() {
deleteExtractedLibraries(this.extractedTempLibraries);
this.extractedTempLibraries.clear();
}
Expand Down

0 comments on commit c833d99

Please sign in to comment.