The code in SpatialIndexHandler::checkSpatialIndexEntries assumes the length of spatialIndex and bufferedList are equal:
Iterator<?> entryIt = spatialIndex.entryIterator();
Iterator<?> omgIt = bufferedList.iterator();
while (entryIt.hasNext() && omgIt.hasNext()) {
but when the shape file contains empty records this is not the case.
This is only a problem if buffered is set to true in SpatialIndexHandler.