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

javadoc tool: javadoc isn't handling -linkoffline @links and @see correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.2.2, 1.3.0, 1.4.0
    • tools

      I wasn't able to find anything similar in the bug reports, and I've
      twisted my hair trying to find the bug in my own code.

      If I'm doing something wrong, please tell me! I can't find solution.

      I have the following configuration:

      On one machine, I have a bunch of .java files and packages.
      I want to link to the appropriate types in the JDK documentation
      that's on the java.sun.com servers.

      I'm doing the following:

             javadoc -J-mx32m -J-ms32m -sourcepath . -linkoffline http://java.sun.com/products/jdk/1.2/docs/api /usr/ExternalWebDocuments/products/jdk/1.2/docs/api -d /mydocdir foo.java

      When you look at the output, most of the input that points
      at the 1.2 documentation is generating
      the appropriate HREFs, for example, the return parameters and
      arguments to the methods. However, the @link and @see isn't
      working right.

      The following method is producing the following output. The
      @link and @see are being turned into <CODE> </CODE> without
      the HREFs when point to the offline docs. It's also rewriting the
      <CODE> by omiting the "java.security"
      to "Security.setProperty" insetad of the source input
      "java.security.Security.setProperty()", probably due to an "import" statement.

      The .java files that are local to this package/directory are working just fine
      (see SSLContext).

      INPUT:
      package javax.net.ssl;

      import java.security.*;

      public class foo {

          /**
           * Obtains the default KeyManagerFactory algorithm name.
           *
           * <p>The default algorithm can be changed at runtime by setting
           * the value of the "ssl.KeyManagerFactory.algorithm" security
           * property (set in the Java security properties file or by calling
           * {@link java.security.Security#setProperty(java.lang.String,
           * java.lang.String)})
           * to the desired algorithm name.
           * You could also see this method {@link SSLContext#getInstance(String)}
           *
           * @see java.security.Security#setProperty(java.lang.String, java.lang.String)
           * @see SSLContext#getInstance(String)}
           *
           * @return the default algorithm name as specified in the
           * Java security properties, or an implementation-specific default
           * if no such property exists.
           */
          public final static String getDefaultAlgorithm(String foo) {
          }
      }

      OUTPUT:
      <A NAME="getDefaultAlgorithm(java.lang.String)"><!-- --></A><H3>
      getDefaultAlgorithm</H3>
      <PRE>
      public static final <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>getDefaultAlgorithm</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A>&nbsp;foo)</PRE><DL>
      <DD>Obtains the default KeyManagerFactory algorithm name.

       <p>The default algorithm can be changed at runtime by setting
       the value of the "ssl.KeyManagerFactory.algorithm" security
       property (set in the Java security properties file or by calling
       <CODE>Security.setProperty(java.lang.String,
       java.lang.String)</CODE>)
       to the desired algorithm name.
       You could also see this method <A HREF="../../../javax/net/ssl/SSLContext.html#getInstance(java.lang.String)"><CODE>SSLContext.getInstance(String)</CODE></A><DD><DL>
      <DT><B>Returns:</B><DD>the default algorithm name as specified in the
       Java security properties, or an implementation-specific default
       if no such property exists.<DT><B>See Also: </B><DD><CODE>Security.setProperty(java.lang.String, java.lang.String)</CODE>,
      </DL>

            dkramersunw Douglas Kramer (Inactive)
            wetmore Bradford Wetmore
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: