JSpec and ToolGuide taglets use incorrect relative path

XMLWordPrintable

        The JSpec (@jls, @jvms) and ToolGuide (@toolGuide) taglets produce relative paths from JDK javadocs to the '../specs/' directory. Sometimes these paths get the wrong number of '../' components, breaking the link.

        The taglets currently work based on the assumption that the Element passed to 'toString' can be mapped to the HTML filename being generated. But sometimes the comment on an Element can be lifted into another context (the package or module page, a summary page like 'new-list.html', etc).

        To handle this properly, the Taglet API needs to be updated to provide either the current filename or a path to the documentation root.

        In the mean time, to address broken links introduced by JDK-8370154, we can hack a solution by (1) having the javadoc tool store the "current file" in a static field, (2) building the API javadoc with `--add-exports` so that the static field can be read by the taglets (in an unnamed module), and (3) mapping the current file to the correct relative path in the JSpec and ToolGuide implementations.

              Assignee:
              Dan Smith
              Reporter:
              Dan Smith
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: