Code with Finding: |
class SegmentReader {
static {
try {
String name =
System.getProperty("org.apache.lucene.SegmentReader.class",
SegmentReader.class.getName());
IMPL = Class.forName(name);
} catch (ClassNotFoundException e) {
throw new RuntimeException("cannot load SegmentReader class: " + e, e);
} catch (SecurityException se) {
try {
IMPL = Class.forName(SegmentReader.class.getName());
} catch (ClassNotFoundException e) {
throw new RuntimeException("cannot load default SegmentReader class: " + e, e);
}
}
}
}
class SegmentReader {
static {
try {
String name =
System.getProperty("org.apache.lucene.ReadOnlySegmentReader.class",
ReadOnlySegmentReader.class.getName());
READONLY_IMPL = Class.forName(name);
} catch (ClassNotFoundException e) {
throw new RuntimeException("cannot load ReadOnlySegmentReader class: " + e, e);
} catch (SecurityException se) {
try {
READONLY_IMPL = Class.forName(ReadOnlySegmentReader.class.getName());
} catch (ClassNotFoundException e) {
throw new RuntimeException("cannot load default ReadOnlySegmentReader class: " + e, e);
}
}
}
}
|