Bug 97550 - [1.5][dom] NPE in BindingKeyResolver while displaying match in Search view
Summary: [1.5][dom] NPE in BindingKeyResolver while displaying match in Search view
Status: RESOLVED WONTFIX
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 RC2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-31 11:56 EDT by Frederic Fusier CLA
Modified: 2005-06-02 09:57 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2005-05-31 11:56:31 EDT
Using 3.1 RC1.

1) Open a new workspace in self-hosting environment, create a new project and
set its JRE Library to 1.5.0.
2) Open Plug-ins view and add org.eclipse.debug.ui to Java Search path
3) Open java.util.List and hit Ctrl+Shift+G (search references in workspace).
4) Set a breakpoint on NullPointerException
5) When search is finished, click on button Show Next Match in Search view
=> debugger stop at NPE breakpoint in DefaultBindingresolver.resolveName(Name)
line 1032 as this.scope == null

The origin of this problem is that while creating ASTParser in
CompilationUnitResolver.convert(CompilationUnitDeclaration, ...) method,
compilationUnitDeclaration.scope is null and so DefaultBindingResolver is
initialized with a null argument for scope...

Note that this NPE does not appears in console as it's catched silently by
JDT/UI code...
Comment 1 Jerome Lanneluc CLA 2005-06-02 09:57:33 EDT
We actually behave nicely. We catch the NPE (in JDT Core code) and return null.
This is a case very similar to bug 53357.
No further action needed.