mirror of https://github.com/apache/lucene.git
Don't fail on unknown IOContexts - TODO: Move the default buffer size into the Context enum as getter?
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1379459 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3a2f6e9dc8
commit
a9071632c0
|
@ -355,14 +355,10 @@ public abstract class BufferedIndexInput extends IndexInput {
|
||||||
*/
|
*/
|
||||||
public static int bufferSize(IOContext context) {
|
public static int bufferSize(IOContext context) {
|
||||||
switch (context.context) {
|
switch (context.context) {
|
||||||
case DEFAULT:
|
|
||||||
case FLUSH:
|
|
||||||
case READ:
|
|
||||||
return BUFFER_SIZE;
|
|
||||||
case MERGE:
|
case MERGE:
|
||||||
return MERGE_BUFFER_SIZE;
|
return MERGE_BUFFER_SIZE;
|
||||||
default:
|
default:
|
||||||
throw new AssertionError("unknown IOContext " + context.context);
|
return BUFFER_SIZE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue