You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by eb...@apache.org on 2013/10/08 13:55:16 UTC

svn commit: r1530244 - /commons/proper/jci/trunk/fam/src/main/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitor.java

Author: ebourg
Date: Tue Oct  8 11:55:16 2013
New Revision: 1530244

URL: http://svn.apache.org/r1530244
Log:
Fixed a NPE when FilesystemAlterationMonitor.stop() is called before start() (JCI-62)

Modified:
    commons/proper/jci/trunk/fam/src/main/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitor.java

Modified: commons/proper/jci/trunk/fam/src/main/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitor.java
URL: http://svn.apache.org/viewvc/commons/proper/jci/trunk/fam/src/main/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitor.java?rev=1530244&r1=1530243&r2=1530244&view=diff
==============================================================================
--- commons/proper/jci/trunk/fam/src/main/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitor.java (original)
+++ commons/proper/jci/trunk/fam/src/main/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitor.java Tue Oct  8 11:55:16 2013
@@ -59,9 +59,11 @@ public final class FilesystemAlterationM
     public void stop() {
         running = false;
 
-        try {
-            thread.join(delay);
-        } catch (InterruptedException e) {
+        if (thread != null) {
+            try {
+                thread.join(delay);
+            } catch (InterruptedException e) {
+            }
         }
     }