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.

Bug 185701 - NullPointerException at org.netbeans.modules.javascript.editing.JsIndex.getUnknownFunctions
Summary: NullPointerException at org.netbeans.modules.javascript.editing.JsIndex.getUn...
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-07 14:04 UTC by fortruth
Modified: 2010-05-18 12:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 151757


Attachments
stacktrace (1.74 KB, text/plain)
2010-05-07 14:04 UTC, fortruth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fortruth 2010-05-07 14:04:12 UTC
Build: NetBeans IDE Dev (Build 201005040200)
VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: Linux

User Comments:
fortruth: when I create a new template in code Templates with html
<script type="text/javascript>
${cursor}
</

when type / it happened.

GUEST: I was adding  code template text




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.javascript.editing.JsIndex.getUnknownFunctions(JsIndex.java:242)
   at org.netbeans.modules.javascript.editing.JsIndex.getAllNamesTruncated(JsIndex.java:138)
   at org.netbeans.modules.javascript.editing.JsCodeCompletion.completeFunctions(JsCodeCompletion.java:1217)
   at org.netbeans.modules.javascript.editing.JsCodeCompletion.complete(JsCodeCompletion.java:469)
   at org.netbeans.modules.csl.editor.completion.GsfCompletionProvider$JavaCompletionQuery.addCodeCompletionItems(GsfCompletionProvider.java:607)
   at org.netbeans.modules.csl.editor.completion.GsfCompletionProvider$JavaCompletionQuery.resolveCompletion(GsfCompletionProvider.java:595)
Comment 1 fortruth 2010-05-07 14:04:20 UTC
Created attachment 98630 [details]
stacktrace
Comment 2 Marek Fukala 2010-05-18 12:27:43 UTC
I like NPEs on line like this:

context.getSnapshot().getSource().getFileObject().getURL().toExternalForm();

:-)

I've iffed all the expressions possibly returning null in web-main#7608447e956e