Bug 92059 - IVariableBinding#getJavaElement() thows NPE for array's 'length' field
Summary: IVariableBinding#getJavaElement() thows NPE for array's 'length' field
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 83501
Blocks:
  Show dependency tree
 
Reported: 2005-04-20 09:01 EDT by Markus Keller CLA
Modified: 2005-05-11 13:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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