Bug 81417 - [dom] getJavaElement() throws a NPE for WildcardBinding
Summary: [dom] getJavaElement() throws a NPE for WildcardBinding
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 M5   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-16 11:26 EST by Frederic Fusier CLA
Modified: 2005-02-15 06:07 EST (History)
0 users

See Also:


Attachments
Proposed fix (792 bytes, patch)
2004-12-16 13:13 EST, Jerome Lanneluc CLA
no flags Details | Diff
Regression test (1.60 KB, patch)
2004-12-16 13:14 EST, Jerome Lanneluc CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2004-12-16 11:26:28 EST
Using 3.1 M4 candidate I200412160010.
Test case:
class X<T> {}
public class Test {
	X<? extends Exception> test;	
}

If you try to get java element for WildcardBinding of WildcardType, you get null.

Also happen with 3.1 M3.
Comment 1 Jerome Lanneluc CLA 2004-12-16 11:52:32 EST
Actually it should return null, but it currently throws a NPE.
Comment 2 Jerome Lanneluc CLA 2004-12-16 13:13:34 EST
Created attachment 16709 [details]
Proposed fix
Comment 3 Jerome Lanneluc CLA 2004-12-16 13:14:00 EST
Created attachment 16710 [details]
Regression test
Comment 4 Jerome Lanneluc CLA 2005-01-03 05:39:29 EST
Released fix and regression test (ASTModelBridgeTest#testWildCard())
Comment 5 David Audel CLA 2005-02-15 06:07:24 EST
Verified in I20050214-0927