Summary: | [compiler] Could diagnose unused local types | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Philipe Mulet <philippe_mulet> | ||||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | enhancement | ||||||||
Priority: | P3 | CC: | eric_jodet, martinae | ||||||
Version: | 3.3 | Keywords: | contributed | ||||||
Target Milestone: | 3.3 M5 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Philipe Mulet
2007-01-11 04:04:49 EST
Created attachment 56752 [details]
Proposed patch
With this patch, following diagnoses are emitted:
----------
1. WARNING in d:\eclipse\workspaces\dev3.3\plugins\Crap\src\X.java (at line 2)
private class M {
^
The type X.M is never used locally
----------
2. WARNING in d:\eclipse\workspaces\dev3.3\plugins\Crap\src\X.java (at line 3)
private class Member {}
^^^^^^
The type X.M.Member is never used locally
----------
3. WARNING in d:\eclipse\workspaces\dev3.3\plugins\Crap\src\X.java (at line 4)
private class Member2 extends M {
^^^^^^^
The type X.M.Member2 is never used locally
----------
4. WARNING in d:\eclipse\workspaces\dev3.3\plugins\Crap\src\X.java (at line 4)
private class Member2 extends M {
^^^^^^^
Access to enclosing constructor X.M() is emulated by a synthetic accessor method. Increasing its visibility will improve your performance
----------
5. WARNING in d:\eclipse\workspaces\dev3.3\plugins\Crap\src\X.java (at line 8)
class Local {}
^^^^^
The type Local is never used locally
----------
6. WARNING in d:\eclipse\workspaces\dev3.3\plugins\Crap\src\X.java (at line 9)
class Local2 {
^^^^^^
The type Local2 is never used locally
----------
7. WARNING in d:\eclipse\workspaces\dev3.3\plugins\Crap\src\X.java (at line 11)
class LMember2 extends Local2 {
^^^^^^^^
The type Local2.LMember2 is never used locally
----------
8. WARNING in d:\eclipse\workspaces\dev3.3\plugins\Crap\src\X.java (at line 13)
LMember m;
^
The field Local2.m is never read locally
----------
9. WARNING in d:\eclipse\workspaces\dev3.3\plugins\Crap\src\X.java (at line 15)
int i = 0;
^
The local variable i is never read
----------
Eric - pls challenge the proposed patch Created attachment 56842 [details]
Philippe's patch + tests (modified and added)
All tests (modified and new ones) completed OK.
No modification to your original patch
Eric.
Thanks Eric. Released for 3.3M5. Fixed CC'ed Martin, in case JDT/UI needs to adjust (quickfix/cleanup?) Verified for 3.3 M5 using build I20070206-0010 |