michael-o commented on code in PR #180: URL: https://github.com/apache/maven-doxia/pull/180#discussion_r1428900306
########## doxia-core/src/main/java/org/apache/maven/doxia/index/IndexingSink.java: ########## @@ -104,15 +106,21 @@ private IndexingSink(IndexEntry rootEntry, Sink delegate) { stack.push(rootEntry); usedIds = new HashMap<>(); usedIds.put(rootEntry.getId(), new AtomicInteger()); - init(); + this.type = 0; + this.title = null; } /** * This should only be called once the sink is closed. * Before that the tree might not be complete. * @return the tree of entries starting from the root + * @throws IllegalStateException in case the sink was not closed yet */ public IndexEntry getRootEntry() { + if (!isComplete) { + throw new IllegalStateException( + "The sink has not been closed yet, i.e. the index tree is not complete yet"); Review Comment: This sink... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org