Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4684827
Votes 0
Synopsis stddoclet: @throws {@inheritDoc} doesn't account for import differences
Category doclet:tbd
Reported Against 1.4
Release Fixed 1.4.2(mantis)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs
Submit Date 14-MAY-2002
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 {
    }
}

===================================================

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.

 xxxxx@xxxxx  2002-08-08In 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 {
    }
}
Work Around
N/A
Evaluation
This bug has been fixed for mantis.  However, it is pending review.
 xxxxx@xxxxx  2002-08-08
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang