class FSDirectory {
static {
try {
String name =
System.getProperty("org.apache.lucene.FSDirectory.class",
SimpleFSDirectory.class.getName());
if (FSDirectory.class.getName().equals(name)) {
// FSDirectory will be abstract, so we replace it by the correct class
IMPL = SimpleFSDirectory.class;
} else {
IMPL = Class.forName(name);
}
} catch (ClassNotFoundException e) {
throw new RuntimeException("cannot load FSDirectory class: " + e.toString(), e);
} catch (SecurityException se) {
IMPL = SimpleFSDirectory.class;
}
}
}
class FSDirectory {
static {
try {
DIGESTER = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e.toString(), e);
}
}
}
|