Bug 124801

Summary: IType.getMethod(String,String[]) not accepting signatures with '/'
Product: [Eclipse Project] JDT Reporter: Christopher Daly <cjdaly>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann
Version: 3.2   
Target Milestone: 3.6 M1   
Hardware: All   
OS: All   
Whiteboard:

Description Christopher Daly CLA 2006-01-22 05:44:59 EST
I'm observing that for binary types and methods the IMethod.getSignature() returns something like this:

  (Ljava/lang/String;)Ljava/lang/reflect/Field;

While IMethod.getParameterTypes() returns a String[] with the signatures like this:

  Ljava.lang.String;

Note '/' in the first case and '.' in the second.  I regarded this as merely odd, because according to the documentation in the Signature class it seems both forms are valid.

However when I go searching for methods using IType.getMethod(String,String[]) I notice that it only accepts signatures with '.'.  If you call it with '/' in the signatures you will get back an IMethod for which IMethod.exists() returns false.

So is this a bug, or am I misunderstanding something about the use of '.' and '/' in signatures?
Comment 1 Olivier Thomann CLA 2009-06-25 11:35:24 EDT
All methods on the Signature class expect dot based signatures.
Closing as INVALID.
Comment 2 Frederic Fusier CLA 2009-08-04 08:45:01 EDT
Verified for 3.6M1