JDK-8049344 : MonitorVmStartTerminate fails intermittently
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2014-07-04
  • Updated: 2014-07-04
  • Resolved: 2014-07-04
Related Reports
Duplicate :  
Description
The test contains a method for creating a file that is used for process signaling.

            Files.write(path, new byte[0], StandardOpenOption.CREATE);
-           if (!Files.exists(path)) {
-                throw new Error("Newly created file " + path
-                        + " does not exist!");
-            }
        }

An unexpected exception may be thrown if file is removed between Files.write and .Files.exists. Fix is to remove Files.exist call.