[
https://issues.apache.org/jira/browse/DOXIA-710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17797485#comment-17797485
]
ASF GitHub Bot commented on DOXIA-710:
--------------------------------------
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...
> Inconsistent anchors between toc macro and headers
> --------------------------------------------------
>
> Key: DOXIA-710
> URL: https://issues.apache.org/jira/browse/DOXIA-710
> Project: Maven Doxia
> Issue Type: Bug
> Reporter: Slawomir Jaranowski
> Assignee: Konrad Windszus
> Priority: Critical
>
> In markdown document add:
> {code:java}
> <!-- MACRO{toc|fromDepth=2} -->
> {code}
> Then anchors generated by toc macro looks like: {{#Your_First_Mojo}}
> and anchors generated by skin looks like: {{#your-first-plugin}}
> - Doxia Site Renderer 2.0.0-M4
> - Fluido Skin 1.11.1
> Tested on Maven main site without more investigate.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)