From 25fc5123ce4833c759cf2b29c63c52aae50c4ab0 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Tue, 27 Dec 2011 13:40:42 +0100 Subject: [PATCH] EA-32239 (process may have been already restarted) --- .../intellij/openapi/vfs/impl/local/FileWatcher.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java index 9c0460a085b7..ea4349f159c3 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java @@ -444,11 +444,13 @@ public class FileWatcher { } private void writeLine(String line) throws IOException { + if (LOG.isDebugEnabled()) { + LOG.debug("to fsnotifier: " + line); + } + + final Process process = notifierProcess; + final BufferedWriter writer = notifierWriter; try { - if (LOG.isDebugEnabled()) { - LOG.debug("to fsnotifier: " + line); - } - final BufferedWriter writer = notifierWriter; if (writer != null) { writer.write(line); writer.newLine(); @@ -457,7 +459,6 @@ public class FileWatcher { } catch (IOException e) { try { - final Process process = notifierProcess; if (process != null) { process.exitValue(); }