Bug 3428 - DCR: compiler warning for unthrown checked exceptions (1GKS73Z)
Summary: DCR: compiler warning for unthrown checked exceptions (1GKS73Z)
Status: RESOLVED DUPLICATE of bug 22976
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P3 enhancement (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:54 EDT by Philipe Mulet CLA
Modified: 2003-08-28 12:27 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 Philipe Mulet CLA 2001-10-10 22:54:58 EDT
from Dave Dykstal:

Is there a way the compiler can check the throws clause for checked exceptions that can't 
be delivered by the method?  Right now I can do this:

	public void blort() throws BlortException {
		rawBlort(5);
	}

	public void rawBlort(int n) {
		}

even if BlortException is not be thrown by the method body.  Does this make sense?  
Is there a case where something like this would be useful?  A diagnostic would be very 
helpful in cleaning up code after exception classes have been refactored.


NOTES:

PM (10/1/2001 6:21:00 PM)
	An optional warning would be indicated, but could be annoying in general.
Comment 1 Philipe Mulet CLA 2001-10-11 08:30:08 EDT
Nice to have
Comment 2 DJ Houghton CLA 2001-10-29 17:13:30 EST
PRODUCT VERSION:
SDK 202

Comment 3 Philipe Mulet CLA 2002-07-25 06:59:36 EDT
Reopening
Comment 4 Philipe Mulet CLA 2002-07-25 07:00:53 EDT
Clearing resolution
Comment 5 Philipe Mulet CLA 2002-12-06 05:47:01 EST
Nice to have, but not for 2.1
Comment 6 Philipe Mulet CLA 2003-08-28 12:26:48 EDT
Addressed for 3.0M4.
Comment 7 Philipe Mulet CLA 2003-08-28 12:27:10 EDT

*** This bug has been marked as a duplicate of 22976 ***