Skip to content

Commit 8f08020

Browse files
author
SendaoYan
committed
8344903: Improve error handling TestJhsdbJstackPrintVMLocks.java
Reviewed-by: lmesnik, dholmes
1 parent a83cfe2 commit 8f08020

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackPrintVMLocks.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ public static void main(String[] args) throws Exception {
7979
}
8080
throw new RuntimeException("Not able to find lock");
8181
} finally {
82-
theApp.getProcess().destroyForcibly();
82+
if (theApp.getProcess() != null) {
83+
theApp.deleteLock();
84+
theApp.getProcess().destroyForcibly();
85+
}
8386
}
8487
}
8588
}

0 commit comments

Comments
 (0)