Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 365193

Summary: [xtend] refactoring: invalid validation "method will have constructor name"
Product: [Tools] Xtend Reporter: Moritz Eysholdt <moritz.eysholdt>
Component: CoreAssignee: Project Inbox <xtend-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: jan, sven.efftinge
Version: 2.2.0   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Moritz Eysholdt CLA 2011-11-30 08:45:26 EST
Example:

-------
class foo {
	def bar() {}
}
-------

refactor "bar" to "foo" and refactoring will raise a warning "If you proceees, the method....... will have a constructor name".

This validation is invalid, since in Xtend the constructors are named "new" and not like the class (as in Java).
Comment 1 Jan Koehnlein CLA 2011-12-08 07:16:43 EST
This message comes frm JDT and is not essentially wrong: It will compile to a Java method that has a constructor name. This issue will be hidden, as we generate a @SuppressWarnings("all").
Comment 2 Jan Koehnlein CLA 2011-12-08 07:21:24 EST
BTW, renaming a method to 'new' is also invalid which will be prompted by JDT:
"'new' is not a valid identifier". Do you thing we need an additional Xtend based error message for this case?
Comment 3 Jan Koehnlein CLA 2012-11-01 06:42:39 EDT
I'd like to close this as

* The issue arises only if people use either lowercase class names or uppercase method names. Who does so should be used to seeing lots of warnings...
* The issue is there. It is just not on the Xtend but on the derived Java side.
* It's only a warning, doesn't keep anyone from doing something.

If anybody objects, please reopen.