assertion: custoim index implementation must not be null

This commit is contained in:
Eugene Zhuravlev
2011-04-29 16:00:32 +02:00
parent a2287326ad
commit debe266676
@@ -442,8 +442,10 @@ public class FileBasedIndex implements ApplicationComponent {
private <K, V> UpdatableIndex<K, V, FileContent> createIndex(final ID<K, V> indexId, final FileBasedIndexExtension<K, V> extension, final MemoryIndexStorage<K, V> storage) throws IOException {
final MapReduceIndex<K, V, FileContent> index;
if (extension instanceof CustomImplementationFileBasedIndexExtension) {
final UpdatableIndex<K, V, FileContent> custom =
((CustomImplementationFileBasedIndexExtension<K, V, FileContent>)extension).createIndexImplementation(indexId, this, storage);
final UpdatableIndex<K, V, FileContent> custom = ((CustomImplementationFileBasedIndexExtension<K, V, FileContent>)extension).createIndexImplementation(indexId, this, storage);
assert custom != null : "Custom index implementation must not be null; index: " + indexId;
if (!(custom instanceof MapReduceIndex)) {
return custom;
}