United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4684827 stddoclet: @throws {@inheritDoc} doesn't account for import differences
JDK-4684827 : stddoclet: @throws {@inheritDoc} doesn't account for import differences

Details
Type:
Bug
Submit Date:
2002-05-14
Status:
Resolved
Updated Date:
2002-10-25
Project Name:
JDK
Resolved Date:
2002-10-25
Component:
docs
OS:
generic
Sub-Component:
doclet
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.2 (mantis)

Related Reports

Sub Tasks

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
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
                                     
2002-08-08
EVALUATION

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

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis

FIXED IN:
mantis

INTEGRATED IN:
mantis
mantis-b05


                                     
2004-06-14



Hardware and Software, Engineered to Work Together