Bug 49491 - Add option to toggle warning for Javadoc multiple same name @throws tags
Summary: Add option to toggle warning for Javadoc multiple same name @throws tags
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-03 17:13 EST by Gary Gregory CLA
Modified: 2004-02-11 05:42 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Gregory CLA 2004-01-03 17:13:45 EST
Some projects I work on have multiple same name @throws tags. For example:

    /**
     * Returns an observable bag where changes are notified to listeners.
     * <p>
     * This method creates an observable bag and attaches the specified listener.
     * If more than one listener or other complex setup is required then the
     * ObservableBag class should be accessed directly.
     *
     * @deprecated TO BE REMOVED BEFORE v3.0
     * @param bag  the bag to decorate, must not be null
     * @param listener  bag listener, must not be null
     * @return the observed bag
     * @throws IllegalArgumentException if the bag or listener is null
     * @throws IllegalArgumentException if there is no valid handler for the
listener
     */

This is legal of course and not mentioned in
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#throwstag

This gives me warnings all over the place, it would be nice to be able to toggle
this warning.
Version 3.0.m6.
Comment 1 Philipe Mulet CLA 2004-01-06 09:24:30 EST
Instead of adding yet another option, we should simply be more resilient and 
tolerate more than one declaration of a thrown exception.
Comment 2 Gary Gregory CLA 2004-01-06 14:49:46 EST
FWIW, I only suggested adding an option in the case the e team really thought
this a good warning since the Sun javadoc app does not raise a warning in such
cases.
Comment 3 Frederic Fusier CLA 2004-01-13 05:18:25 EST
Fixed.

Just comment loop which verified that throws tag were not duplicated in 
jdt.internal.compiler.ast.Javadoc.resolveThrowsTags(MethodScope,boolean).

Test cases added in jdt.core.tests.compiler.regression.JavadocTestMixed.
Comment 4 David Audel CLA 2004-02-11 05:42:08 EST
Verified for 3.0M7.