Index: src/java/org/apache/lucene/index/DirectoryReader.java =================================================================== --- src/java/org/apache/lucene/index/DirectoryReader.java (revision 782475) +++ src/java/org/apache/lucene/index/DirectoryReader.java (working copy) @@ -479,7 +479,7 @@ // Success, and a new reader was actually opened reader.closeDirectory = true; // Clone the directory - reader.directory = FSDirectory.getDirectory(((FSDirectory) directory).getFile()); + reader.directory = FSDirectory.open(((FSDirectory) directory).getFile()); } } } Index: src/java/org/apache/lucene/index/IndexModifier.java =================================================================== --- src/java/org/apache/lucene/index/IndexModifier.java (revision 782475) +++ src/java/org/apache/lucene/index/IndexModifier.java (working copy) @@ -137,7 +137,7 @@ * @throws IOException if there is a low-level IO error */ public IndexModifier(String dirName, Analyzer analyzer, boolean create) throws CorruptIndexException, LockObtainFailedException, IOException { - Directory dir = FSDirectory.getDirectory(dirName); + Directory dir = FSDirectory.open(new File(dirName)); this.closeDir = true; init(dir, analyzer, create); } @@ -156,7 +156,7 @@ * @throws IOException if there is a low-level IO error */ public IndexModifier(File file, Analyzer analyzer, boolean create) throws CorruptIndexException, LockObtainFailedException, IOException { - Directory dir = FSDirectory.getDirectory(file); + Directory dir = FSDirectory.open(file); this.closeDir = true; init(dir, analyzer, create); } Index: src/java/org/apache/lucene/index/IndexReader.java =================================================================== --- src/java/org/apache/lucene/index/IndexReader.java (revision 782475) +++ src/java/org/apache/lucene/index/IndexReader.java (working copy) @@ -208,7 +208,7 @@ * Use {@link #open(Directory, boolean)} instead * @param path the path to the index directory */ public static IndexReader open(String path) throws CorruptIndexException, IOException { - return open(FSDirectory.getDirectory(path), true, null, null, false); + return open(FSDirectory.open(new File(path)), true, null, null, false); } /** Returns an IndexReader reading the index in an @@ -225,7 +225,7 @@ * Use {@link #open(Directory, boolean)} instead */ public static IndexReader open(String path, boolean readOnly) throws CorruptIndexException, IOException { - return open(FSDirectory.getDirectory(path), true, null, null, readOnly); + return open(FSDirectory.open(new File(path)), true, null, null, readOnly); } /** Returns a read/write IndexReader reading the index in an FSDirectory in the named @@ -237,7 +237,7 @@ * Use {@link #open(Directory, boolean)} instead */ public static IndexReader open(File path) throws CorruptIndexException, IOException { - return open(FSDirectory.getDirectory(path), true, null, null, false); + return open(FSDirectory.open(path), true, null, null, false); } /** Returns an IndexReader reading the index in an @@ -254,7 +254,7 @@ * Use {@link #open(Directory, boolean)} instead */ public static IndexReader open(File path, boolean readOnly) throws CorruptIndexException, IOException { - return open(FSDirectory.getDirectory(path), true, null, null, readOnly); + return open(FSDirectory.open(path), true, null, null, readOnly); } /** Returns a read/write IndexReader reading the index in @@ -524,7 +524,7 @@ * Use {@link #lastModified(Directory)} instead */ public static long lastModified(File fileDirectory) throws CorruptIndexException, IOException { - Directory dir = FSDirectory.getDirectory(fileDirectory); // use new static method here + Directory dir = FSDirectory.open(fileDirectory); // use new static method here try { return lastModified(dir); } finally { @@ -576,7 +576,7 @@ * Use {@link #getCurrentVersion(Directory)} instead */ public static long getCurrentVersion(File directory) throws CorruptIndexException, IOException { - Directory dir = FSDirectory.getDirectory(directory); + Directory dir = FSDirectory.open(directory); long version = getCurrentVersion(dir); dir.close(); return version; @@ -1195,7 +1195,7 @@ * Use {@link #isLocked(Directory)} instead */ public static boolean isLocked(String directory) throws IOException { - Directory dir = FSDirectory.getDirectory(directory); + Directory dir = FSDirectory.open(new File(directory)); boolean result = isLocked(dir); dir.close(); return result; Index: src/java/org/apache/lucene/index/IndexWriter.java =================================================================== --- src/java/org/apache/lucene/index/IndexWriter.java (revision 782475) +++ src/java/org/apache/lucene/index/IndexWriter.java (working copy) @@ -841,7 +841,7 @@ */ public IndexWriter(String path, Analyzer a, boolean create, MaxFieldLength mfl) throws CorruptIndexException, LockObtainFailedException, IOException { - init(FSDirectory.getDirectory(path), a, create, true, null, false, mfl.getLimit(), null, null); + init(FSDirectory.open(new File(path)), a, create, true, null, false, mfl.getLimit(), null, null); } /** @@ -870,7 +870,7 @@ */ public IndexWriter(String path, Analyzer a, boolean create) throws CorruptIndexException, LockObtainFailedException, IOException { - init(FSDirectory.getDirectory(path), a, create, true, null, true, DEFAULT_MAX_FIELD_LENGTH, null, null); + init(FSDirectory.open(new File(path)), a, create, true, null, true, DEFAULT_MAX_FIELD_LENGTH, null, null); } /** @@ -903,7 +903,7 @@ */ public IndexWriter(File path, Analyzer a, boolean create, MaxFieldLength mfl) throws CorruptIndexException, LockObtainFailedException, IOException { - init(FSDirectory.getDirectory(path), a, create, true, null, false, mfl.getLimit(), null, null); + init(FSDirectory.open(path), a, create, true, null, false, mfl.getLimit(), null, null); } /** @@ -932,7 +932,7 @@ */ public IndexWriter(File path, Analyzer a, boolean create) throws CorruptIndexException, LockObtainFailedException, IOException { - init(FSDirectory.getDirectory(path), a, create, true, null, true, DEFAULT_MAX_FIELD_LENGTH, null, null); + init(FSDirectory.open(path), a, create, true, null, true, DEFAULT_MAX_FIELD_LENGTH, null, null); } /** @@ -1019,7 +1019,7 @@ */ public IndexWriter(String path, Analyzer a, MaxFieldLength mfl) throws CorruptIndexException, LockObtainFailedException, IOException { - init(FSDirectory.getDirectory(path), a, true, null, false, mfl.getLimit(), null, null); + init(FSDirectory.open(new File(path)), a, true, null, false, mfl.getLimit(), null, null); } /** @@ -1043,7 +1043,7 @@ */ public IndexWriter(String path, Analyzer a) throws CorruptIndexException, LockObtainFailedException, IOException { - init(FSDirectory.getDirectory(path), a, true, null, true, DEFAULT_MAX_FIELD_LENGTH, null, null); + init(FSDirectory.open(new File(path)), a, true, null, true, DEFAULT_MAX_FIELD_LENGTH, null, null); } /** @@ -1072,7 +1072,7 @@ */ public IndexWriter(File path, Analyzer a, MaxFieldLength mfl) throws CorruptIndexException, LockObtainFailedException, IOException { - init(FSDirectory.getDirectory(path), a, true, null, false, mfl.getLimit(), null, null); + init(FSDirectory.open(path), a, true, null, false, mfl.getLimit(), null, null); } /** @@ -1096,7 +1096,7 @@ */ public IndexWriter(File path, Analyzer a) throws CorruptIndexException, LockObtainFailedException, IOException { - init(FSDirectory.getDirectory(path), a, true, null, true, DEFAULT_MAX_FIELD_LENGTH, null, null); + init(FSDirectory.open(path), a, true, null, true, DEFAULT_MAX_FIELD_LENGTH, null, null); } /** @@ -5376,7 +5376,7 @@ * @deprecated Use {@link #isLocked(Directory)} */ public static boolean isLocked(String directory) throws IOException { - Directory dir = FSDirectory.getDirectory(directory); + Directory dir = FSDirectory.open(new File(directory)); try { return isLocked(dir); } finally { Index: src/java/org/apache/lucene/store/RAMDirectory.java =================================================================== --- src/java/org/apache/lucene/store/RAMDirectory.java (revision 782475) +++ src/java/org/apache/lucene/store/RAMDirectory.java (working copy) @@ -82,7 +82,7 @@ * @deprecated Use {@link #RAMDirectory(Directory)} instead */ public RAMDirectory(File dir) throws IOException { - this(FSDirectory.getDirectory(dir), true); + this(FSDirectory.open(dir), true); } /** @@ -94,7 +94,7 @@ * @deprecated Use {@link #RAMDirectory(Directory)} instead */ public RAMDirectory(String dir) throws IOException { - this(FSDirectory.getDirectory(dir), true); + this(FSDirectory.open(new File(dir)), true); } public synchronized final String[] list() {