@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);
try {
closeWriter(writer.getAndSet(null));
} finally {
- directory.getAndSet(null).close();
+ FileUtils.uncheckedClose(directory.getAndSet(null));
}
}
}