LUCENE-1499: enforce IndexFileNameFilter as singleton

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@728746 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2008-12-22 19:21:40 +00:00
parent 51f9b759fa
commit 5c8ea7a321
1 changed files with 3 additions and 2 deletions

View File

@ -28,11 +28,12 @@ import java.util.HashSet;
*/
public class IndexFileNameFilter implements FilenameFilter {
static IndexFileNameFilter singleton = new IndexFileNameFilter();
private static IndexFileNameFilter singleton = new IndexFileNameFilter();
private HashSet extensions;
private HashSet extensionsInCFS;
public IndexFileNameFilter() {
// Prevent instantiation.
private IndexFileNameFilter() {
extensions = new HashSet();
for (int i = 0; i < IndexFileNames.INDEX_EXTENSIONS.length; i++) {
extensions.add(IndexFileNames.INDEX_EXTENSIONS[i]);