Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328839 - [quick fix] Quick fix for unused variable should keep qualifier of field reference
Summary: [quick fix] Quick fix for unused variable should keep qualifier of field refe...
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-27 11:03 EDT by Deepak Azad CLA
Modified: 2019-08-29 11:17 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Deepak Azad CLA 2010-10-27 11:03:23 EDT
FUP of Bug 328481

Steps
- Code snippet to use
package snippet;
public class Snippet {	
	    private int fField;
	    void bar() {
	        new Snippet().fField++;
	        new Snippet().fField= 12;
	        Snippet snippet = new Snippet();
	        snippet.fField++;
	        snippet.fField=12;
	    }	
}

- Invoke the quick fix on fField =>
            void bar() {
	        Snippet snippet = new Snippet();
	    }	

The result could probably be
             void bar() {
                new Snippet();
	        new Snippet();
	        Snippet snippet = new Snippet();
	    }
Comment 1 Markus Keller CLA 2010-10-28 10:12:17 EDT
Problem to solve: Quick fix for unused variable should keep the qualifier of a removed field reference iff the qualifier could have side effects.
Comment 2 Eclipse Genie CLA 2019-08-29 11:17:42 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.