anchors need to be updated when copied to index-all.html
Martin Buchholz
martinrb at google.com
Mon Jul 22 10:45:20 PDT 2013
Hi javadoc team,
This is a bug report.
If javadoc contains something like this:
* <p id="bitEquals">This class compares primitive {@code double}
then links like <a href="filename#bitEquals" ... work fine in the generated
javadoc.
However, when this text is copied to index-all.html by javadoc, I see in
the generated javadoc
<a href="./jsr166e/extra/#bitEquals">bitwise equal</a>
which is a broken link because it is missing the filename.
(javadoc obviously has code to handle this because the directory was added,
but what about the filename? oughttabe easy to fix)
If multiple such links are defined in multiple files, you will have a name
clash.
Repro using jsr166 CVS:
(rm -rf /tmp/t8 && mkdir -p /tmp/t8 && cd /tmp/t8 && cvs -d ':
pserver:anonymous at gee.cs.oswego.edu/home/jsr166/jsr166' checkout jsr166 &&
cd jsr166/src/jsr166e && { ~/jdk/jdk8/bin/javadoc extra/AtomicDouble*.java;
find -name '*.html' | xargs grep -w bitEquals ; })
...
Generating ./jsr166e/extra/AtomicDouble.html...
...
Generating ./jsr166e/extra/AtomicDoubleArray.html...
extra/AtomicDoubleArray.java:17: error: anchor already defined: bitEquals
* <p id="bitEquals">This class compares primitive {@code double}
...
./index-all.html: if the current value is <a
href="./jsr166e/extra/#bitEquals">bitwise equal</a>
./index-all.html: if the current value is <a
href="./jsr166e/extra/#bitEquals">bitwise equal</a>
./jsr166e/extra/AtomicDoubleArray.html: <p id="bitEquals">This class
compares primitive <code>double</code>
./jsr166e/extra/AtomicDouble.html: <p id="bitEquals">This class compares
primitive <code>double</code>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/javadoc-dev/attachments/20130722/125613fc/attachment.html
More information about the javadoc-dev
mailing list