Skip to content

Commit

Permalink
8344903: Improve error handling TestJhsdbJstackPrintVMLocks.java
Browse files Browse the repository at this point in the history
Reviewed-by: lmesnik, dholmes
  • Loading branch information
SendaoYan committed Nov 25, 2024
1 parent a83cfe2 commit 8f08020
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ public static void main(String[] args) throws Exception {
}
throw new RuntimeException("Not able to find lock");
} finally {
theApp.getProcess().destroyForcibly();
if (theApp.getProcess() != null) {
theApp.deleteLock();
theApp.getProcess().destroyForcibly();
}
}
}
}

1 comment on commit 8f08020

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.