anchors need to be updated when copied to index-all.html

Jonathan Gibbons jonathan.gibbons at oracle.com
Mon Jul 22 11:54:15 PDT 2013


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:anonymous at gee.cs.oswego.edu/home/jsr166/jsr166 
> <http://pserver:anonymous@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/6fada6db/attachment.html 


More information about the javadoc-dev mailing list