This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build: NetBeans IDE 6.9 RC1 (Build 201005202201) VM: Java HotSpot(TM) Client VM, 16.0-b13, Java(TM) SE Runtime Environment, 1.6.0_18-b06 OS: Linux User Comments: ppis: Trying to edit jsp file. GUEST: Editing a .jsp file. Happened when I hit my enter key to add a new line. The jsp file was not being parsed (syntax highlighting) Stacktrace: java.lang.NullPointerException at org.netbeans.modules.web.core.syntax.completion.ElCompletionProvider.isAfterElDelimiter(ElCompletionProvider.java:98) at org.netbeans.modules.web.core.syntax.completion.ElCompletionProvider.getAutoQueryTypes(ElCompletionProvider.java:91) at org.netbeans.modules.editor.completion.CompletionImpl.insertUpdate(CompletionImpl.java:315) at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.insertUpdate(PriorityDocumentListenerList.java:82) at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185) at org.netbeans.editor.BaseDocument.fireInsertUpdate(BaseDocument.java:1661)
Created attachment 99376 [details] stacktrace
P1.
I can't reproduce. Can anyone who can reproduce please attach reproducible steps, or the file on which this is happening?
The problem happened due to token.text() returning unexpected 'null', so it can be very rare/difficult to reproduce. Adding a simple NPE check may or may not be the right solution, I am investigating it..
After clearing the user directory, I am not able to reproduce it.
I am unable to reproduce as well but it should be nice to add at least NPE check ? Keeping it as P1
It was actually not token.getText() returning null, but tokenHierarchy.tokenSequence() returning null. This situation was made possibe after some recent performance optimizations implemented by Mila (token hierarchy is switched off during formatting and undo actions), but anyways tokenHierarchy.tokenSequence() should be always checked for null, therefore adding a simple NPE is a legitimate solution. It's been already done in trunk: http://hg.netbeans.org/web-main/rev/1fe417dc3a0d
Vito, please review the fix
The fix is OK.
The fix was integrated to the release69 branch: http://hg.netbeans.org/release69/rev/82a28abb0221
Integrated into 'main-golden', will be available in build *201005250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/1fe417dc3a0d User: Tomasz Slota <tslota@netbeans.org> Log: #186587: NullPointerException at org.netbeans.modules.web.core.syntax.completion.ElCompletionProvider.isAfterElDelimiter
Verified in the RC1 build by QE.
v.