Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4652655

@link does not link to external -link'd classes unless they are imported

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.2
    • 1.4.0, 1.4.1
    • tools
    • mantis
    • generic, x86
    • generic, other, linux, windows_2000

      javadoc @links to other -linked packages but still not to
      (all) contained classes (or further down methods and fields);
      see below.

      If you javadoc the example already known

      ------------- start ------------------------
      package DE.a_weinert.math;
      import DE.a_weinert.math.DecDigsIntf;

      /** <b>Dezimalzahl, ziffernweise</b>. <br />
       * <br />
       * Objekte dieser Klasse stellen eine Dezimalzahl
       * blah blah ......................
       * @author Albrecht Weinert
       * @version V00.02 (11.03.2002 09:17)
       * @see DE.a_weinert.math
       * @see DE.a_weinert.math.Complex
       * @see DE.a_weinert.math.CFun
       * @see DE.a_weinert.math.SFun
       * @see DE.a_weinert.math.DecDigsIntf
       * @see DE.a_weinert.math.DecFormat
       */
       // bisher V00.00 (27.10.2000 10:35) : Anfang
       // V00.01 (03.11.2000 18:36) : Parsen nach DecDigsP
       // V00.02 (11.03.2002 08:57) : /**
       //
      public class DecDigs implements DecDigsIntf {

      //.... much code

      /** Setzen mit double. <br />
       * <br />
       * Diese Methode ist schneller aber etwas ungenauer (etwa auf 16
      Stellen) als
       * entsprechende Methoden beziehungsweise Konstruktoren von
       * {@link java.lang.Double} beziehungsweise
       * {@link java.math.BigDecimal}.
       * Entsprechend schließt sie einen Aufruf von
       * {@link #roundTo roundTo}(16)
       * oder für große negative Exponenten von
       * {@link #roundTo roundTo}(15) ein.
       */
         public void set(double d) {
      // ...... and the rest

      ------------- End ------------------------

      and all the packages with the commands

      ------------- start ------------------------

      if not exist C:\Programme\jdk\docs\aWeinertBib\nul
           md C:\Programme\jdk\docs\aWeinertBib

      PushD C:\Programme\jdk\docs\aWeinertBib

      C:\Programme\jdk\docs\aWeinertBib> if exist
             ..\api\org\w3c\dom\Document.html goto :m1-1.4
      REM Seit 1.4.x haben wir endlich XML.

      C:\Programme\jdk\docs\aWeinertBib> Javadoc -author -version
        -protected -use -J-mx 32m -J-ms32m -link ../api -link ../jDOM
      -sourcepath D:\Weinert\javaFactory @D:\Weinert\javaFactory\DEawDoc.list

      Loading source file D:\Weinert\javaFactory\FS.java...
      Loading source file D:\Weinert\javaFactory\FuR.java...
      Loading source file D:\Weinert\javaFactory\KnopfGen.java...

      ------------- End ------------------------

      you get one warning :

      ---------- start-----------------------------
      Generating DE\a_weinert\math\DecDigs.html...
      D:\Weinert\javaFactory\DE\a_weinert\math\DecDigs.java:409: warning - Tag
      @link:
      reference not found: java.math.BigDecimal
      ----------------- end -------------------------

      and the .html

      ---------- start-----------------------------
       <A HREF="../../../../api/java/lang/Double.html"><CODE>Double</CODE></A>
      beziehungsweise
        <CODE>java.math.BigDecimal</CODE>.
      ----------------- end -------------------------

      Now:

      If you change

       * {@link java.lang.Double} beziehungsweise
       * {@link java.math.BigDecimal}.

      to the mystirious }}

       * {@link java.lang.Double} beziehungsweise
       * {@link java.math}.BigDecimal}.

      you get no warnings at all
      and the .html

      ---------- start-----------------------------
        <A
      HREF="../../../../api/java/lang/Double.html"><CODE>Double</CODE></A>
      beziehungsweise
        <A
      HREF="../../../../api/java/math/package-summary.html">java.math</A>.BigDecimal}.
      ----------------- end -------------------------


      So, from all the stuff below, the javadoc bug that survived bta to
      final is:

      javadoc can @link to -linked standard packages but not to
      (all ?!?) classes (or further down methods and fields) in them.

      That is much to my (our?) surprise as the javadoc description
      promises to look only in the package lists and generate the links
      to inside blindly. So the link to BigDecimal should have been
      generated (even if BigDecimal wouldn't exist, which, of course, it
      does) like the link to Double.

      As we see, the link to Double is done now. The beta javadoc
      failed there as well.

      So, now, thats your turn.


            jhosunw Jamie Ho (Inactive)
            dkramersunw Douglas Kramer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: