JDK-4662658 : javadoc: With -link, all @see/@link tags should create links to excluded classes
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: other
  • CPU: generic
  • Submitted: 2002-04-04
  • Updated: 2014-05-05
  • Resolved: 2002-04-15
Related Reports
Duplicate :  
Description
To reduce the confusion this is a new RFE
based on much of the conversation in bug 4330419.

When @see or {@link} refers to a class that is neither
referenced in a declaration or import nor included on
the command line, but -link or -linkoffline points to it, 
the link is not generated.  That is, the text appears 
without any link.  The link should be generated.

The current behavior requires the developer to add an import 
statement to be added to the source code merely for the 
link to work.  This seems unnecessarily burdensome.
We have created an FAQ answer stating to comment the
import statement 

Example:

package p;

//import java.util.List;

/**
 * This inline link tag has no link when its import statement is missing
 * {@link java.util.List}.
 */
public class Test {
}

% javadoc -d docs -linkoffline http://java.sun.com/j2se/1.3/docs/api . p

The HTML comment looks like this -- notice there are no
<A HREF> links:

  This inline link tag has no link when its import statement is missing
  java.util.List

By uncommenting the "import java.util.List" statement, the link appears.
Note that starting with 1.4.0, wildcard import "import java.util.*" is
sufficient for the link to appear.

Comments
PUBLIC COMMENTS Please correct me if I am wrong but I believe this bug is a duplicate of 4652655 (which I have fixed for the 1.4.2 release). The cross links to external classes were not working. Looking at the code, I find it hard to believe that this feature ever worked. For more details on this fix, you can view the webrev at: http://javaweb.sfbay/~dkramer/javadoc/1.4/stddoclet-ws/webrevs/4652655-classCrossLinks/webrev/ This fix allows cross references to external classes when -link is used. It also allows cross references to members of external classes. Please note that the doclet assumes that a fully qualified class name is used. I believe this is necessary because -link only tells the doclet which packages are documented externally (by reading file package-list). The doclet has no way to determine which package a class belongs to unless it is fully qualified [or imported or in a declaration]. You don't have to include an import statement for the link to appear but again, you must use a fully qualified class name. ###@###.### 2002-04-15 Links to classes that were imported or included in a declaration have worked prior to this bug fix. This bug fixes classes that are not imported or included in a declaration. The documentation must now state that any class that is not imported or included in a declaration must be fully qualified. (We could remove this requirement by expanding package-list to include classes.) ###@###.### 2003-01-30
30-01-2003

EVALUATION Evaluate for Hopper. ###@###.### 2002-04-03 I am closing this as a duplicate of 4652655. Please see public summary for more details. ###@###.### 2002-04-15
03-04-2002