Bug 49290 - NullpointerException in TypeBinding.getInterfaces().
Summary: NullpointerException in TypeBinding.getInterfaces().
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-22 17:42 EST by Kelvin CLA
Modified: 2004-02-11 09:39 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 Kelvin CLA 2003-12-22 17:42:28 EST
get an NullPointerException in TypeBinding.getInterface() line 189.

this method should handle NullPointerException and return NO_INTERFACES.
Comment 1 Philipe Mulet CLA 2003-12-23 08:59:39 EST
Which build are you using ? Are you talking about the API or non API type 
binding ? Do you have steps to reproduce ? If non API, then we shouldn't change 
anything for free.
Comment 2 Kent Johnson CLA 2003-12-23 10:55:23 EST
org.eclipse.jdt.internal.compiler.lookup.TypeBinding does not implement 
getInterfaces().

Moving to the dom.

The NPE happens on the first line of the method because the binding is null.
Comment 3 Olivier Thomann CLA 2004-01-02 11:56:59 EST
I can add extra null check, but the binding should not be null.
Could you provide a test case that leads to this?
Therefore you should not be able to get a type binding in this case.
Thanks.
Comment 4 Olivier Thomann CLA 2004-01-08 10:35:38 EST
Could you please comment? I need some information on how you ended up with a
null binding. Do you have errors in your code? If yes, could you please provide
a test case?
Thanks.
Comment 5 Kelvin CLA 2004-01-08 11:53:49 EST
actually, i can't create a test case for you because it is not happening all 
the time. But if you can add a NullPointer check inside the method, i think it 
will be great. Thanks.
Comment 6 Olivier Thomann CLA 2004-01-08 12:10:37 EST
I will. But if the binding is null, you might have other failures.
Comment 7 Kelvin CLA 2004-01-08 12:19:52 EST
it is fine for me.
Comment 8 Olivier Thomann CLA 2004-01-08 16:28:49 EST
Added extra null check.
If you get such a failure again, please open another bug report and provide a 
test case.
Comment 9 Frederic Fusier CLA 2004-02-11 09:39:21 EST
Verified for 3.0-M7 with build I200402102000.