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:
Yonik Seeley 2008-12-01 01:10:30 +00:00
parent ffb547eabd
commit 9430364ea5
1 changed files with 3 additions and 2 deletions

View File

@ -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);
}
}