mirror of https://github.com/apache/lucene.git
fix test bug (and fix IWC to fail immediately if you do this)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1439519 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dc57c8eb7c
commit
4cfc012bfa
|
@ -288,6 +288,9 @@ public final class IndexWriterConfig extends LiveIndexWriterConfig implements Cl
|
|||
* Only takes effect when IndexWriter is first created.
|
||||
*/
|
||||
public IndexWriterConfig setCodec(Codec codec) {
|
||||
if (codec == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
this.codec = codec;
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -116,6 +116,9 @@ public class LiveIndexWriterConfig {
|
|||
writeLockTimeout = IndexWriterConfig.WRITE_LOCK_TIMEOUT;
|
||||
indexingChain = DocumentsWriterPerThread.defaultIndexingChain;
|
||||
codec = Codec.getDefault();
|
||||
if (codec == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
infoStream = InfoStream.getDefault();
|
||||
mergePolicy = new TieredMergePolicy();
|
||||
flushPolicy = new FlushByRamOrCountsPolicy();
|
||||
|
|
|
@ -55,8 +55,8 @@ public class TestPerFieldDocValuesFormat extends BaseDocValuesFormatTestCase {
|
|||
|
||||
@Override
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
codec = new RandomCodec(new Random(random().nextLong()), Collections.<String>emptySet());
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue