Bug 92059

Summary: IVariableBinding#getJavaElement() thows NPE for array's 'length' field
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 83501    
Bug Blocks:    

Description Markus Keller CLA 2005-04-20 09:01:00 EDT
I20050414-1107

IVariableBinding#getJavaElement() thows NPE for array's 'length' field. 

    	int[] a= null;
    	int lenA= a.length;

java.lang.NullPointerException
	at
org.eclipse.jdt.core.dom.VariableBinding.getJavaElement(VariableBinding.java:130)
	at org.eclipse.jdt.astview.views.Binding.getChildren(Binding.java:172)
...
Comment 1 Philipe Mulet CLA 2005-04-21 04:46:48 EDT
Added ASTConverterTestAST3_2#test0605.
Fixed (will be released along with changes for bug 84496)
Comment 2 Philipe Mulet CLA 2005-04-21 04:48:58 EDT
Olivier - pls verify changes. When binding declaringClass is null (for
arraylength field) in qualified name, one must use previous binding type (which
cannot be captured in any way).
Comment 3 Philipe Mulet CLA 2005-04-21 09:12:42 EDT
Released
Comment 4 Olivier Thomann CLA 2005-05-11 13:19:17 EDT
Verified in I20050510-0010