]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcherBase.java
Mark Lucene Index Creator threads daemons
[simantics/platform.git] / bundles / org.simantics.db.indexing / src / org / simantics / db / indexing / IndexedRelationsSearcherBase.java
index 92cbe56d12bacfa76d30696811d90a01cfe4f00f..1c0b9b8416769db88afadb86d5350a62e98d0606 100644 (file)
@@ -577,7 +577,7 @@ abstract public class IndexedRelationsSearcherBase {
         @Override
         public Thread newThread(Runnable r) {
             Thread t = new Thread(r, "Lucene Index Creator");
-            if (t.isDaemon())
+            if (!t.isDaemon())
                 t.setDaemon(true);
             if (t.getPriority() != Thread.NORM_PRIORITY)
                 t.setPriority(Thread.NORM_PRIORITY);
@@ -708,7 +708,7 @@ abstract public class IndexedRelationsSearcherBase {
             try {
                 closeWriter(writer.getAndSet(null));
             } finally {
-                directory.getAndSet(null).close();
+                FileUtils.uncheckedClose(directory.getAndSet(null));
             }
         }
     }