Bug 173849 - ITypeBinding#getJavaElement() fails for array of inner type
Summary: ITypeBinding#getJavaElement() fails for array of inner type
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-12 06:02 EST by Markus Keller CLA
Modified: 2007-03-21 06:24 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 Markus Keller CLA 2007-02-12 06:02:09 EST
I20070209-1006

package xy;
public class Try {
	protected class Inner { }
	Inner[] i;
}

ITypeBinding#getJavaElement() on the type of i returns an non-existing IType with handleIdentifier "=zz1.5/src<xy{Try.java[Inner".

Expected: IType with handleIdentifier "=zz1.5/src<xy{Try.java[Try[Inner"
Comment 1 Olivier Thomann CLA 2007-02-12 09:44:58 EST
Released for 3.3M6.
Markus, could you please double-check?
Comment 2 Markus Keller CLA 2007-02-13 08:37:06 EST
Hmm, almost. It works for Inner[], but not for Inner[][].

When I change line 569 of TypeBinding from
	declaringTypeBinding = this.getComponentType().getDeclaringClass();
to
	declaringTypeBinding = this.getElementType().getDeclaringClass();
, then it works.
Comment 3 Olivier Thomann CLA 2007-02-13 08:44:29 EST
Released for 3.3M6.
Stupid me. This is what I wanted to do.
Comment 4 David Audel CLA 2007-03-21 06:24:08 EDT
Verified for 3.3 M6 using build I20070321-0010

Regression tests for this bug are
  ASTConverter15Test#test0244() -> test0246()