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.
Steps to reproduce: - create an XML document - type & and then any letter after an opening xml tag. For example: <xml-tag> &h </xml-tag> - at the moment when you type 'h' in this scenario NPE will be thrown: java.lang.NullPointerException at org.netbeans.modules.xml.schema.completion.CompletionQuery.getCompletionItems(CompletionQuery.java:82) at org.netbeans.modules.xml.schema.completion.CompletionQuery.query(CompletionQuery.java:74) at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:195) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Which build are you using? The stack trace and the source do not match. Please try this with a newer build. I'm not able to reproduce.
I'm using Milestone 7b build. We will switch as soon as Beta testing is over and I will try to reproduce once more. With Milestone 7b several engineers could reproduce it.
Reproducible with 070301_5.... Create an empty newXMLDocument.xml. Simply type <xml-tag> &h => exception below java.lang.NullPointerException at org.netbeans.modules.xml.schema.completion.CompletionQuery.getCompletionItems(CompletionQuery.java:79) at org.netbeans.modules.xml.schema.completion.CompletionQuery.query(CompletionQuery.java:57) at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:195) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
OK, I see it now. I was using the snippet as in the initial description, that is: <xml-tag> &h </xml-tag> Where as, the trick is: <xml-tag> &h
/cvs/xml/schema/completion/src/org/netbeans/modules/xml/schema/completion/util/CompletionContextImpl.java,v <-- CompletionContextImpl.java new revision: 1.1.2.16; previous revision: 1.1.2.15
Verified in 070307_5.