Duplicate :
|
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.