Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 525549

Summary: [resolver] Possible null pointer exception
Product: [ECD] Orion Reporter: Sebastian Pahnke <pahnke.sebastian>
Component: JS ToolsAssignee: Sebastian Pahnke <pahnke.sebastian>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie
Version: 15.0   
Target Milestone: 17.0   
Hardware: PC   
OS: Mac OS X   
See Also: https://github.com/eclipse/orion.client/pull/210
Whiteboard:

Description Sebastian Pahnke CLA 2017-10-04 06:20:10 EDT
I encountered a case where infer.cx() can be null in the following line of the resolver plugin leading to an NPE and therefore broken content assist in the CodeEditWidget.

https://github.com/eclipse/orion.client/blob/master/bundles/org.eclipse.orion.client.javascript/web/javascript/ternPlugins/resolver.js#L254

Unfortunately I am not able to create a minimal example to reproduce. All I can say is that said function returns null the first time it is called. The second time it has a value.

I have added a null check which I could submit as a pull request.
Comment 1 Michael Rennie CLA 2017-10-04 10:26:11 EDT
(In reply to Sebastian Pahnke from comment #0)

> I have added a null check which I could submit as a pull request.

A PR would be most welcome!
Comment 2 Eclipse Genie CLA 2017-10-04 12:16:13 EDT
GitHub Pull Request 210 created by [spahnke]
https://github.com/eclipse/orion.client/pull/210
Comment 3 Michael Rennie CLA 2017-10-05 08:53:13 EDT
Merged. Thank you Sebastian!