Skip to content

Commit

Permalink
Update launcher to handle null case
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanpadams committed Aug 23, 2024
1 parent 0d6f7ce commit 64cdac7
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main/java/gov/nasa/pds/validate/ValidateLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -575,13 +575,10 @@ private void getLatestJsonContext() {
private void parseJsonObjectWriteTofile(SolrDocumentList docs) {
// backup old file
try {
copyFile(registeredProductsFile, new File(System.getProperty("resources.home")
+ File.separator + ToolInfo.getOutputFileName() + ".backup"));
// System.out.println("back up " +
// System.getProperty("resources.home") + "/" +
// ToolInfo.getOutputFileName()
// + " to " + System.getProperty("resources.home") + "/" +
// ToolInfo.getOutputFileName() + ".backup");
if (registeredProductsFile.exists()) {
copyFile(registeredProductsFile, new File(System.getProperty("resources.home")
+ File.separator + ToolInfo.getOutputFileName() + ".backup"));
}
} catch (IOException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 64cdac7

Please sign in to comment.