Community
Participate
Working Groups
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.
Instead of adding yet another option, we should simply be more resilient and tolerate more than one declaration of a thrown exception.
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.
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.
Verified for 3.0M7.