Bug 36231 - Overjealous "Assignment has no effect"
Summary: Overjealous "Assignment has no effect"
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 3.0 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-08 13:32 EDT by Daniel Serodio CLA
Modified: 2003-06-02 06:13 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 Daniel Serodio CLA 2003-04-08 13:32:59 EDT
We use the following convention for setter methods:

void setFoo(int foo)
{
    this.foo = foo;
}

Eclipse complains that this assignment has no effect.
Comment 1 Philipe Mulet CLA 2003-04-09 04:38:25 EDT
Cannot reproduce with trivial test case:

public class X {
	int foo;
	void setFoo(int foo) {
		this.foo = foo;
	}
}

No error is reported. 
Comment 2 Philipe Mulet CLA 2003-04-09 06:51:56 EDT
Is it ok to close, or do you have more steps to reproduce ?
Comment 3 Daniel Serodio CLA 2003-04-09 09:06:46 EDT
Strange... I've seen it before, but I can't reproduce it now. Ok to close then,
sorry.
Comment 4 Philipe Mulet CLA 2003-04-09 10:43:53 EDT
No problem.Closing. Please reopen if you see it again and have steps.