[hg] main-silver: #233006: prevent NPE when dereferencing conten...

  • From: Jan Lahoda < >
  • To:
  • Subject: [hg] main-silver: #233006: prevent NPE when dereferencing conten...
  • Date: Tue, 23 Jul 2013 00:51:11 -0700

changeset a59a85c2343d in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/a59a85c2343d
description:
        #233006: prevent NPE when dereferencing content of category2Nodes for 
a leaf node.

diffstat:

 
options.editor/src/org/netbeans/modules/options/editor/spi/OptionsFilter.java 
|  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (15 lines):

diff --git 
a/options.editor/src/org/netbeans/modules/options/editor/spi/OptionsFilter.java
 
b/options.editor/src/org/netbeans/modules/options/editor/spi/OptionsFilter.java
--- 
a/options.editor/src/org/netbeans/modules/options/editor/spi/OptionsFilter.java
+++ 
b/options.editor/src/org/netbeans/modules/options/editor/spi/OptionsFilter.java
@@ -192,7 +192,10 @@
         private boolean filterNodes(Object currentNode, String term) {
             boolean accepted = term.isEmpty() || 
acceptor.accept(currentNode, term);
             
-            if (delegate.isLeaf(currentNode)) return accepted;
+            if (delegate.isLeaf(currentNode)) {
+                category2Nodes.put(currentNode, Collections.emptyList());
+                return accepted;
+            }
             
             List<Object> filtered = new 
ArrayList<Object>(delegate.getChildCount(currentNode));
             

[hg] main-silver: #233006: prevent NPE when dereferencing conten...

Jan Lahoda 07/23/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 147 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close