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:
Uwe Schindler 2012-08-31 14:06:08 +00:00
parent 3a2f6e9dc8
commit a9071632c0
1 changed files with 1 additions and 5 deletions

View File

@ -355,14 +355,10 @@ public abstract class BufferedIndexInput extends IndexInput {
*/
public static int bufferSize(IOContext context) {
switch (context.context) {
case DEFAULT:
case FLUSH:
case READ:
return BUFFER_SIZE;
case MERGE:
return MERGE_BUFFER_SIZE;
default:
throw new AssertionError("unknown IOContext " + context.context);
return BUFFER_SIZE;
}
}