Bug 58651 - Javadoc warning for unchecked @throws declaration
Summary: Javadoc warning for unchecked @throws declaration
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-15 10:09 EDT by Dani Megert CLA
Modified: 2004-05-19 12:31 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2004-04-15 10:09:53 EDT
I20040413

I documented an unchecked exception like:
	 * @throws Throwable an unspecified unchecked exception if the object

This gives me a Javadoc warning: Throwable is not declared
Comment 1 Philipe Mulet CLA 2004-04-23 08:47:14 EDT
Don't you have a matching thrown exception in method signature ?
Comment 2 Dani Megert CLA 2004-04-23 09:02:13 EDT
No, but check the two examples where the warnings are once reported and once not:

org.eclipse.text

Assert.isNotNull:
	 * @exception Throwable an unspecified unchecked exception if the object
	 *   is <code>null</code>
	 */
	public static void isNotNull(Object object) {

==> a warning is genereted

org.eclipse.text: FindReplaceDocumentAdapter:
	 * @throws PatternSyntaxException if a regular expression has invalid syntax
	 */
	private IRegion findReplace(FindReplaceOperationCode operationCode, int
startOffset, String findString, String replaceText, boolean forwardSearch,
boolean caseSensitive, boolean wholeWord, boolean regExSearch) throws
BadLocationException {

==> no warning gets generated

Comment 3 Philipe Mulet CLA 2004-04-26 10:01:22 EDT
PatternSyntaxException is an unchecked exception. Therefore we tolerate it to 
be undeclared, as per spec, you don't have to have to declare them, but still 
could want to document them.
Comment 4 Philipe Mulet CLA 2004-04-26 10:01:38 EDT
Ok to close ?
Comment 5 Dani Megert CLA 2004-04-26 10:18:37 EDT
yes