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: 4496270
Votes 0
Synopsis stddoclet: @param and @return are not always copied down from supertype
Category doclet:tbd
Reported Against merlin-beta2
Release Fixed 1.4(merlin-beta3)
State 10-Fix Delivered, Verified, bug
Priority: 3-Medium
Related Bugs
Submit Date 24-AUG-2001
Description
In the following example, the method description is copied down, but the @param and @return are not. This appears to be contrary to the documentation.

package jd;

public class JD {
    /** 
     * description
     *
     * @param o object
     * @return value
     * @throws IOException because
     */
    public boolean foo(Object o) throws java.io.IOException {
	return false;
    }

    public static class Bar extends JD {
	/**
	 * @throws IOException why not
	 */
	public boolean foo(Object o) throws java.io.IOException {
	    return false;
	}
    }
}

This bug has been fixed.  We previously had an "all or nothing rule":

-Copy all of the inherited tags from the overriden or implemented method if no tag documentation exists.
-Don't copy any inherited tags if any tag documentation exists.

We now look at each tag (@param, @return, @throws) individually and copy each one when needed.  Please note that we still have an "all or nothing" rule for @see tags.  Furthermore, only @throws tags for declared exceptions are inherited. 
 xxxxx@xxxxx  2001-09-06In the following example, the method description is copied down, but the @param and @return are not. This appears to be contrary to the documentation.

package jd;

public class JD {
    /** 
     * description
     *
     * @param o object
     * @return value
     * @throws IOException because
     */
    public boolean foo(Object o) throws java.io.IOException {
	return false;
    }

    public static class Bar extends JD {
	/**
	 * @throws IOException why not
	 */
	public boolean foo(Object o) throws java.io.IOException {
	    return false;
	}
    }
}
Work Around
N/A
Evaluation
This bug is high on our priority list and will be fixed soon.  We will also follow the recommendation that you gave for bug 4317583: 

"Please consider inheriting @throws for all exceptions that the subclass
does in fact declare, and preferably inheriting @throws for all runtime
exceptions as well."

We agree with this.

 xxxxx@xxxxx  2001-08-24

This bug has been fixed.  Location of fix:

com/sun/tools/doclets/standard/tags/AbstractExecutableMemberTaglet.java
com/sun/tools/doclets/standard/tags/ParamTaglet.java
com/sun/tools/doclets/standard/tags/ReturnTaglet.java
com/sun/tools/doclets/standard/tags/SeeTaglet.java
com/sun/tools/doclets/standard/tags/ThrowsTaglet.java

 xxxxx@xxxxx  2001-09-06
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang