Description
If text pre-extraction is configured then for empty blobs following exception is seen
2017-07-19 11:14:49,584 ERROR [main] o.a.j.oak.index.IndexCommand - Error occurred while performing index tasks java.lang.StringIndexOutOfBoundsException: String index out of range: 4 at java.lang.String.substring(String.java:1963) ~[na:1.8.0_102] at org.apache.jackrabbit.oak.plugins.index.datastore.DataStoreTextWriter.getFile(DataStoreTextWriter.java:187) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] at org.apache.jackrabbit.oak.plugins.index.datastore.DataStoreTextWriter.getText(DataStoreTextWriter.java:104) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] at org.apache.jackrabbit.oak.plugins.index.lucene.ExtractedTextCache.get(ExtractedTextCache.java:90) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] at org.apache.jackrabbit.oak.plugins.index.lucene.binary.BinaryTextExtractor.parseStringValue(BinaryTextExtractor.java:127) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] at org.apache.jackrabbit.oak.plugins.index.lucene.binary.BinaryTextExtractor.newBinary(BinaryTextExtractor.java:112) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.newBinary(LuceneDocumentMaker.java:398) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.indexProperty(LuceneDocumentMaker.java:257) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.makeDocument(LuceneDocumentMaker.java:128) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.makeDocument(LuceneIndexEditor.java:268) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.addOrUpdate(LuceneIndexEditor.java:244) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.leave(LuceneIndexEditor.java:140) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]