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

Bug 257508

Summary: [model] Synthetic parameter of binary constructor of member types are displayed
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r, Mike_Wilson, srikanth_sankaran, stephan.herrmann
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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 ***