mirror of https://github.com/apache/lucene.git
SOLR-465: use public constructors to get Directory instances
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@721939 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ffb547eabd
commit
9430364ea5
|
@ -1,5 +1,6 @@
|
|||
package org.apache.solr.core;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.lucene.store.Directory;
|
||||
|
@ -15,9 +16,9 @@ public class StandardDirectoryFactory extends DirectoryFactory {
|
|||
|
||||
public Directory open(String path) throws IOException {
|
||||
if (!Constants.WINDOWS) {
|
||||
return NIOFSDirectory.getDirectory(path);
|
||||
return new NIOFSDirectory(new File(path), null);
|
||||
}
|
||||
|
||||
return FSDirectory.getDirectory(path);
|
||||
return new FSDirectory(new File(path), null);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue