JDK-4684827 : stddoclet: @throws {@inheritDoc} doesn't account for import differences
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-05-14
  • Updated: 2020-08-31
  • Resolved: 2002-10-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 Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Description
In the following example, the {@inheritDoc} produces no text description. If the exception class is made fully qualified (java.io.EOFException) to match the @throws in the interface, then the proper description is produced. The fact that one class uses an import statement and the other doesn't shouldn't cause matching up the @throws to fail.

import java.io.IOException;

public interface Iface {
    /**
     * Iface doc.
     *
     * @throws java.io.EOFException if eof occurs
     * @throws IOException if I/O exception occurs
     */
    void foo() throws IOException;
}

import java.io.*;

public class Foo implements Iface {
    /**
     * Foo doc.
     *
     * @throws EOFException {@inheritDoc}
     */
    public void foo() throws IOException {
    }
}

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

PUBLIC COMMENTS In the following example, the {@inheritDoc} produces no text description. If the exception class is made fully qualified (java.io.EOFException) to match the @throws in the interface, then the proper description is produced. The fact that one class uses an import statement and the other doesn't shouldn't cause matching up the @throws to fail. import java.io.IOException; public interface Iface { /** * Iface doc. * * @throws java.io.EOFException if eof occurs * @throws IOException if I/O exception occurs */ void foo() throws IOException; } import java.io.*; public class Foo implements Iface { /** * Foo doc. * * @throws EOFException {@inheritDoc} */ public void foo() throws IOException { } } =================================================== This bug has been fixed. When inheriting @throws documentation using {@inheritDoc}, the doclet only checks for matching exception names in the base and subclass. This does not work if one @throws tag uses a fully qualified name and the overriden @throws tag uses an unqualifed name. I have fixed this bug. The doclet now compares fully qualified names if possible. Please note that this only works if the Exception is in the classpath of Javadoc. Otherwise, Javadoc cannot retrieve the fully qualified name of the Exception. ###@###.### 2002-08-08
08-08-2002

EVALUATION This bug has been fixed for mantis. However, it is pending review. ###@###.### 2002-08-08
08-08-2002