After LUCENE-4371, we still have a non-optimal implementation of IndexInput#slice() in RAMDirectory. We should fix that to use the cloning approach like other directories do
Make all Directory implementations correctly fail with IllegalArgumentException if slices are out of bounds
Improve BufferedIndexInput.SlicedIndexInput to directly delegate
Looks good, thanks Uwe!
Improve IllegalArgumentExceptions, be more strict on out-of-bounds slice.
I will commit this tomorrow and backport to 4.10.
Added ineffectivity warning to BufferedIndexInput#wrap() and cleaned up sliceDescription to be consistent.
This improvement is especially important for slices of NRTCachingDirectory, because it uses RAMDirectory internally, too!
Patch, including new test.
The default impl is now only used by Solr anymore. We should fix this, too and remove the BufferedIndexInput.wrap() one completely.