Bug 130528 - NPE in FieldBinding.getAnnotations(..) for length field of array
Summary: NPE in FieldBinding.getAnnotations(..) for length field of array
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-06 06:43 EST by Markus Keller CLA
Modified: 2006-03-28 08:21 EST (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 2006-03-06 06:43:45 EST
HEAD

NPE in FieldBinding.getAnnotations(..) for length field of array:

public class Try {
    int test(String[] strings) {
        return strings.length; // getAnnotations() on 'length'
    }
}

java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.lookup.FieldBinding.getAnnotations(FieldBinding.java:264)
at org.eclipse.jdt.core.dom.VariableBinding.getAnnotations(VariableBinding.java:46)
at org.eclipse.jdt.astview.views.Binding.getChildren(Binding.java:224)
at org.eclipse.jdt.astview.views.ASTViewContentProvider.getChildren(ASTViewContentProvider.java:95)
...
Comment 1 Olivier Thomann CLA 2006-03-06 10:00:55 EST
Fixed and released in HEAD.
Regression test added in org.eclipse.jdt.core.tests.dom.ASTConverter15Test.test0213
Comment 2 Jerome Lanneluc CLA 2006-03-28 08:21:40 EST
Verified for 3.2 M6 using build I20060328-0010