From 7e09df43e65bdd56df31e0b6eb48db194739923f Mon Sep 17 00:00:00 2001 From: Dmitry Samersoff Date: Mon, 23 Mar 2015 02:29:47 -0700 Subject: [PATCH] 8075569: jmap test fails due to "ERROR: java.nio.file.NoSuchFileException: 2906081d-06bc-4738-a7e8-f37b8bf13658.lck" Lock file is deleted while we are setting modified time Reviewed-by: alanb --- jdk/test/sun/tools/jmap/heapconfig/LingeredApp.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jdk/test/sun/tools/jmap/heapconfig/LingeredApp.java b/jdk/test/sun/tools/jmap/heapconfig/LingeredApp.java index 1ac1a137088..a6f1a64ee88 100644 --- a/jdk/test/sun/tools/jmap/heapconfig/LingeredApp.java +++ b/jdk/test/sun/tools/jmap/heapconfig/LingeredApp.java @@ -417,7 +417,9 @@ public class LingeredApp { setLastModified(theLockFileName, epoch()); Thread.sleep(spinDelay); } - + } catch (NoSuchFileException ex) { + // Lock deleted while we are setting last modified time. + // Ignore error and lets the app exits } catch (Exception ex) { System.err.println("LingeredApp ERROR: " + ex); // Leave exit_code = 1 to Java launcher