Bug 97841

Summary: [1.5][dom] null binding for ClassInstanceCreation
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: philippe_mulet
Version: 3.1   
Target Milestone: 3.1 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Frederic Fusier CLA 2005-06-01 10:14:11 EDT
Using 3.1 RC1.

Looking at ASTConverter15Test#test015 sample in ASTView, I see a null binding
for ClassInstanceCreation in main method:
public class X {
  public static void main(String[] args) {
    test0017.A<String>.B<Integer> o = 
      new test0017.A<String>("Hello").new B<Integer>(new Integer(1));
    System.out.println(o);
  }
}

Note that it's second ClassInstanceCreation which is null:
  new test0017.A<String>("Hello").new B<Integer>(new Integer(1))
first one binding si not null and well set:
  new test0017.A<String>("Hello")
Comment 1 Frederic Fusier CLA 2005-06-01 10:16:48 EDT
Same issue of course with #test018 with ClassInstanceCreation on class B and
class C..
Comment 2 Olivier Thomann CLA 2005-06-01 10:52:05 EDT
Investigating. Candidate for RC2.
Comment 3 Olivier Thomann CLA 2005-06-01 11:11:23 EDT
In fact, no changes are required in the DOM converter. The problem resides in
the QualifiedAllocationExpression where the resolvedType is not persisted.
Comment 4 Philipe Mulet CLA 2005-06-01 11:14:07 EDT
+1 for RC2
Comment 5 Olivier Thomann CLA 2005-06-01 11:15:12 EDT
Fixed and released in HEAD.
Regression test added by updating ASTConverter15Test.test0017
Comment 6 Frederic Fusier CLA 2005-06-07 12:28:35 EDT
Verified for 3.1 RC2 using build N20050607-0010 + JDT/Core HEAD
Comment 7 David Audel CLA 2005-06-10 09:57:00 EDT
Verified for 3.1 RC2 using build I20050610-0010