diff --git a/lib/asciidoctor/java/DocIndexer.java b/lib/asciidoctor/java/DocIndexer.java index 4bcddbbe8c..45cad3db1e 100644 --- a/lib/asciidoctor/java/DocIndexer.java +++ b/lib/asciidoctor/java/DocIndexer.java @@ -104,6 +104,9 @@ public class DocIndexer { IndexWriter iwriter = new IndexWriter(directory, config); for (String inputFile : inputFiles) { File file = new File(inputFile); + if (file.length() == 0) { + continue; + } BufferedReader titleReader = new BufferedReader( new InputStreamReader(new FileInputStream(file), "UTF-8"));