Bug 40569 - New compiler warning: uncommented (catch) block
Summary: New compiler warning: uncommented (catch) block
Status: RESOLVED DUPLICATE of bug 32285
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 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-21 15:53 EDT by Gary Gregory CLA
Modified: 2003-07-22 12:26 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 Gary Gregory CLA 2003-07-21 15:53:13 EDT
IMHO opinion, this not commenting empty catch block is very bad practice. I am
not sure if this falls under the E compiler warning phylosophy but... the
following could be flaged as a warning:

... 
catch (FooException foo) {
}

while the following would not:

catch (FooException foo) {
   // any kind of comment
}
Comment 1 Philipe Mulet CLA 2003-07-22 04:10:48 EDT
Lucky you, I just released support for this one for today's integration build !
It also finds empty methods, empty types and all empty blocks, which are not 
documented as you were suggesting.

*** This bug has been marked as a duplicate of 32285 ***
Comment 2 Gary Gregory CLA 2003-07-22 12:26:36 EDT
Whoa, you must have ESP... ;-)