Martin,
Thanks for the report. Filed as 8021010.
-- Jon
On 07/22/2013 10:45 AM, Martin Buchholz wrote:
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:[email protected]/home/jsr166/jsr166
<http://pserver:[email protected]/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>