Summary: | [compiler] Incorrect unused method warning from compiler | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Srikanth Sankaran <srikanth_sankaran> | ||||
Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | eclipsebugs, jarthana | ||||
Version: | 3.5 | ||||||
Target Milestone: | 3.6 M4 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Srikanth Sankaran
2009-12-01 22:17:13 EST
Created attachment 153560 [details]
Proposed patch
(In reply to comment #0) > while the message is "technically" correct i.e foo is never used "locally", > one of the quick fix provided viz, "Remove method foo" could lead to build > errors if method foo was used elsewhere. Huh? The "unused locally" warning means what it says -and- that the element in question is not visible outside. Otherwise you would have to flag all public methods of any class as "unused locally", unless they are used by the class itself. So this is not a bug just because of the quick fix. (In reply to comment #2) > (In reply to comment #0) > > while the message is "technically" correct i.e foo is never used "locally", > > one of the quick fix provided viz, "Remove method foo" could lead to build > > errors if method foo was used elsewhere. > Huh? The "unused locally" warning means what it says -and- that the element in > question is not visible outside. Otherwise you would have to flag all public > methods of any class as "unused locally", unless they are used by the class > itself. So this is not a bug just because of the quick fix. Yes, I was not suggesting this is a bug only because of the offered quick fix. The quick fix was mentioned because, whenever something is flagged as unused, you should be able to delete it without any deleterious effect and that is not guaranteed in this case. As for the first part, it is perhaps splitting hairs on my part, I was merely pointing out that the message literally is not incorrect. When viewed in the larger context of this diagnotic being useful however, it needs fixing and hence this bug. Released in HEAD for 3.6M4 Verified for 3.6M4 using build I20091207-1800 |