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 251217 - NullPointerException at org.netbeans.modules.javascript.nodejs.ui.libraries.SearchPanel.filterByName
Summary: NullPointerException at org.netbeans.modules.javascript.nodejs.ui.libraries.S...
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Jan Stola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-16 20:03 UTC by Vladimir Riha
Modified: 2015-03-18 03:28 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 216147


Attachments
stacktrace (5.48 KB, text/plain)
2015-03-16 20:03 UTC, Vladimir Riha
Details
output from "npm search sanitizer" (1.20 KB, text/plain)
2015-03-16 20:11 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2015-03-16 20:03:45 UTC
Build: NetBeans IDE Dev (Build 201503121016)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b18
OS: Linux

User Comments:
vriha: Trying to search for "sanitizer" in "Add NPM package" dialog while having "Search in package names only"




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.javascript.nodejs.ui.libraries.SearchPanel.filterByName(SearchPanel.java:272)
   at org.netbeans.modules.javascript.nodejs.ui.libraries.SearchPanel$Listener$1.run(SearchPanel.java:469)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
   at java.awt.EventQueue.access$200(EventQueue.java:103)
   at java.awt.EventQueue$3.run(EventQueue.java:694)
Comment 1 Vladimir Riha 2015-03-16 20:03:47 UTC
Created attachment 152659 [details]
stacktrace
Comment 2 Vladimir Riha 2015-03-16 20:11:53 UTC
Created attachment 152660 [details]
output from "npm search sanitizer"

Problem seems to be that npm search returns server error...
Comment 3 Jan Stola 2015-03-17 10:59:13 UTC
I am able to reproduce this issue when I break my npm proxy settings (npm search sanitizer works fine for me otherwise).

I had forgotten to check for search fail when I added the 'search in package names only' filtering. The exception is not thrown when this check-box is not selected.

Fixed by https://hg.netbeans.org/web-main/rev/b15ee8e64341
Comment 4 Quality Engineering 2015-03-18 03:28:07 UTC
Integrated into 'main-silver', will be available in build *201503180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b15ee8e64341
User: Jan Stola <jstola@netbeans.org>
Log: #251217: Avoiding NPE when npm search fails