RFR: 8325532: serviceability/dcmd/compiler/PerfMapTest.java leaves created files in the /tmp dir.

Chris Plummer cjplummer at openjdk.org
Sat Mar 2 00:46:51 UTC 2024


On Sat, 2 Mar 2024 00:14:22 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>  Q2: Can we use Files.deleteIfExists(path) in the finally block of the run() method instead?

I don't think that changes anything. If run() throws an exception and then Files.deleteIfExists() throws an exception from the finally block, the original exception is lost.

> One more approach is to wrap run() call into the runHelper() method:

Same issue with potentially losing the original exception.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17992#discussion_r1509758594


More information about the serviceability-dev mailing list