JDK-4640745 : REGRESSION: Prepends destination directory (-d) to local links (-link)
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-02-21
  • Updated: 2014-05-05
  • Resolved: 2002-04-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.1 hopperFixed
Description

Name: nt126004			Date: 02/20/2002


FULL PRODUCT VERSION :
java version "1.4.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.
Java HotSpot(TM) Client VM (build 1.4.0-rc-b91, mixed mode)

FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
No service packs

A DESCRIPTION OF THE PROBLEM :
I am writing some new code, and trying to tie in the new
code's documentation to some other javadoc documents.  I
notice that when running Javadoc on my code, the destination
directory for the new documentation is incorrectly
pre-pended to the pre-existing linked documentation. For
instance, if I enter:

javadoc -link D:\Computer\JavaPrograms\docs -d .\docs cse300.a1

I receive an error message:

javadoc: Error reading file:
.\docs\D:\Computer\JavaPrograms\docs/package-list

The intent is that the new documentation will appear in the
subdirectory "docs" off the current directory, linked to the
documentation in "D:\Computer\JavaPrograms\docs", but the
new destination directory is prepended to the old, and the
old documentation is not found.

REGRESSION.  Last worked in version 1.3.1

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Put some javadoc-generated documentation into some
directory DIR1.
2. Create a new documentation directory DIR2 for some new
java class.
3. Run javadoc specifying options: -link DIR1 -d DIR2

EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected resuls: Fully-linked Javadoc-generated
documentation between two local directories.

Actual results: Javadoc errors out, citing an incorrect link
directory as the reason.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
javadoc: Error reading file: .\docs\D:\Computer\JavaPrograms\docs/package-list

This bug can be reproduced always.

---------- BEGIN SOURCE ----------
This is not a source code problem.  I will repeat, instead, the command-line I
used to find the error:

javadoc -link D:\Computer\JavaPrograms\docs -d .\docs cse300.a1

cse300.a1 is the package I am trying to document and link to javadoc
documentation inside directory "D:\Computer\JavaPrograms\docs".
---------- END SOURCE ----------

CUSTOMER WORKAROUND :
Option -link is supposed to work with URLs, and by
prepending "file:\\" to the link value, the javadoc command
works (i.e., "javadoc -link
file:\\D:\Computer\JavaPrograms\doc -d .\docs cse300.a1"
works properly).

Release Regression From : 1.3.1
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

(Review ID: 139561) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: hopper FIXED IN: hopper INTEGRATED IN: hopper
2004-06-14

EVALUATION I can believe this is a bug, as this code was modified in 1.4, as mentioned in this related bug: The option -linkoffline (and hence -link) in 1.4 Beta 1 has its first argument relative to the *destination* directory. (In 1.4 Beta 2, this was broken to be relative to the current directory but was fixed for Beta 3.) Source: 4468641 - Doc should say -link is relative to destination directory Also, the fix for this bug might be related to the following bug. When fixing this bug, make sure there is no regression on the following bug. 4401496 stddoclet: With -link to relativeURL, directory is duplicated in generated links ###@###.### 2002-02-20 The doclet assumes that the path specified by the -link option is relative. The -link option should be able to handle absolute paths as well. I have fixed this bug. Location of fix: com/sun/tools/doclets/standard/Extern.java A regression test has been added at: test/com/sun/javadoc/testAbsLinkPath/testAbsLinkPathWrapper.sh ###@###.### 2002-04-15
2002-04-15

PUBLIC COMMENTS This bug has been fixed. The -link option now works with absolute paths. ###@###.### 2002-04-15
2002-04-15