commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r1530244 - /commons/proper/jci/trunk/fam/src/main/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitor.java
Date Tue, 08 Oct 2013 11:55:16 GMT
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) {
+            }
         }
     }
 



Mime
View raw message