[ http://jira.codehaus.org/browse/MJXR-5?page=all ]
Brett Porter closed MJXR-5:
---------------------------
Assign To: Brett Porter
Resolution: Won't Fix
Fix Version: (was: 2.0)
> Relative link to Xref not determined reliably
> ---------------------------------------------
>
> Key: MJXR-5
> URL: http://jira.codehaus.org/browse/MJXR-5
> Project: Maven 2.x JXR Plugin
> Type: Bug
> Reporter: Nick Giles
> Assignee: Brett Porter
> Attachments: MOJO-jxr.patch
>
>
> Using the HEAD revision of the JXR plugin, I find that with certain of my
> projects determining the relative link between the xref and the jxr.html page
> can both crash and provide incorrect results. The problem is basically this
> line:
> String relativPath = des.getAbsolutePath().substring(
> out.getAbsolutePath().length() + 1 );
> It does no content checking, and thus when for instance the output directory
> contains some '..' elements, it doesn't consider how that affects the length.
> A slight improvement is:
> String relativPath = des.getCanonicalPath().substring(
> out.getCanonicalPath().length() + 1 );
> which will at least be better so long as the locations point to similar
> filesystem locations (see attached patch).
> What is really needed is to do a filesystem based compare of the two
> locations and determine what the link should be - or just add a parameter to
> let the link be defined as a parameter, and reduce the cases that are
> guaranteed to work automatically.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira