Bug 35907 - compiler: unused parameters
Summary: compiler: unused parameters
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0 M1   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-01 06:57 EST by Noel Grandin CLA
Modified: 2003-07-18 06:57 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 Noel Grandin CLA 2003-04-01 06:57:13 EST
The "unused parameters" warning would be more useful if it
could limit itself to only checking private methods.

Any other methods are often likely to have extra parameters because
(a) they are overriding a method and they don't need the extra data
(b) they are going to be overriden the overriders need the extra data

Which makes this less useful than it could be, because it produces
too many false positives.
Comment 1 Philipe Mulet CLA 2003-04-01 07:29:34 EST
Which build are you using ? Unused parameter diagnosis is ignoring method which 
are overriding others.
Comment 2 Noel Grandin CLA 2003-04-01 08:00:26 EST
build 200303071024.

That's great, but it doesn't help where I have methods that
are meant to be overriden, and thus define more parameters
than they actually need.
Kind of like abstract methods, except that I supply an empty
body so that the subclasses do not HAVE to implement them.
Comment 3 Philipe Mulet CLA 2003-04-01 08:29:22 EST
I agree with your point for top methods which aren't easy to isolate (JDT/Core 
has some warnings due to this, and there isn't much you can do for these at the 
moment). Only flagging private methods would be quite restrictive.
Comment 4 Noel Grandin CLA 2003-04-01 08:41:26 EST
Agreed. 

Might be an idea to have a means of turning
isolated warnings off on a per-class/method basis,
perhaps using javadoc labels.
But that also seems like too much effort for too
little reward.

Request closed.