Community
Participate
Working Groups
In this code here: textInputListener = new ITextInputListener() { public void inputDocumentChanged(IDocument oldInput, IDocument newInput) { try { xtextDocument.removeModelListener(modelListener); xtextDocument = XtextDocumentUtil.get(newInput); xtextDocument.addModelListener(modelListener); scheduleRefresh(); } catch (Throwable t) { LOG.error("Error refreshing outline", t); } } public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) { } }; XTextDocumentUtil.get(newInput) can return null as the xtextDocument. We use the XtextDocument object without checking the return value, causing NPE to happen.
Is it possible to target this for the next 2.0 SR? Thanks!
Scheduled for 2.1
*** Bug 345388 has been marked as a duplicate of this bug. ***
Added a couple of NPE guards. I'd like to provide a test, too, but I can't figure out how to reproduce the NPE. Can you give me a hint?
(In reply to comment #4) > I'd like to provide a test, too, but I can't figure out how to reproduce the > NPE. Can you give me a hint? Ping.
As there was no hint how to test this, I am closing this without a test.
Closing all bugs that were set to RESOLVED before Neon.0