Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 257508 - [model] Synthetic parameter of binary constructor of member types are displayed
Summary: [model] Synthetic parameter of binary constructor of member types are displayed
Status: RESOLVED DUPLICATE of bug 47354
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-04 07:14 EST by David Audel CLA
Modified: 2011-12-04 18:43 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2008-12-04 07:14:03 EST
build I20081202-1812

1) create a P1 java project with 1.5 compliance
2) create p/Test.java in P1
package p;

import java.util.ArrayList;

public class Test {
	public class Inner {
		public Inner(ArrayList<Object> o){}
	}
}
3) create a P2 java project with 1.5 compliance
4) add P1/bin as class folder in the class path of P2
5) in P2 open the constructor of Inner in the PackageExplorer
the label of the constructor is 'Inner(ArrayList<Object>)'
6) replace the content of P1/p/Tests.java with the following content
package p;

import java.util.ArrayList;

public class Test {
	public class Inner {
		public Inner(Object o){}
	}
}
7) the label of the constructor of Inner is replaced by 'Inner(Test,Object)'

The label should be 'Inner(Object)'


The problem seems to be inside ClassFileInfo#generateMethodInfos().
methodInfo.getGenericSignature() is used when the method contains a generic type and methodInfo.getMethodDescriptor() when there is no generic type. But the descriptor contains the enclosing type as first parameter and not the signature.
generateMethodInfos() should ignore the synthetic parameter of the descriptor.
Comment 1 Mike Wilson CLA 2009-05-05 12:29:51 EDT
Changing Version tag to something more believable.
Comment 2 Markus Keller CLA 2011-11-27 16:42:08 EST

*** This bug has been marked as a duplicate of bug 47354 ***