Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325297 - [search] NPE when searching for callout in a role nested in a role file
Summary: [search] NPE when searching for callout in a role nested in a role file
Status: RESOLVED WORKSFORME
Alias: None
Product: Objectteams
Classification: Tools
Component: OTDT (show other bugs)
Version: 0.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 2.3 RC1   Edit
Assignee: Project Teams CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-14 17:14 EDT by Stephan Herrmann CLA
Modified: 2014-05-15 16:59 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 Stephan Herrmann CLA 2010-09-14 17:14:14 EDT
Currently class MyJavaLinkedModeProposal 
(in CompletionAdaptor.CreateMethodMappingCompletionProposal)
contains an unused callout binding computeEdits -> computeEdits.

When searching for references to this (selecting the role method spec)
the following NPE occurrs:

java.lang.NullPointerException
	at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:165)
	at org.eclipse.jdt.internal.core.search.matching.MethodPattern.<init>(MethodPattern.java:172)
	at org.eclipse.jdt.core.search.SearchPattern.createPattern(SearchPattern.java:2078)
	at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:124)
	at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:91)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Stephan Herrmann CLA 2010-09-16 17:49:50 EDT
Code inspection yields that the NPE cannot occur with a regular
JavaElement (getElementInfo() can only return non-null or throw).

Some overrides exist in package codeassist.impl that could potentially
return null, but at this point it is totally unclear, how the search
and the AssistXY could be related.

I've added OTJavaMethodSearchTests.test325297() to witness the general
working in the specified scenario (not able to reproduce the NPE).
Comment 2 Stephan Herrmann CLA 2013-03-14 09:54:48 EDT
candidate for WORKSFORME
Comment 3 Stephan Herrmann CLA 2014-05-15 16:59:49 EDT
closing as per previous comment, since it was never again observed.