[hg] main-silver: #219864 - NPE when rendering a JList

  • From: "S. Aubrecht" < >
  • To: , ,
  • Subject: [hg] main-silver: #219864 - NPE when rendering a JList
  • Date: Fri, 28 Jun 2013 10:47:26 -0700

changeset 24de261a3b5c in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/24de261a3b5c
description:
        #219864 - NPE when rendering a JList

diffstat:

 
bugtracking/src/org/netbeans/modules/bugtracking/ui/search/SearchResultRenderer.java
 |  2 +-
 spi.quicksearch/src/org/netbeans/modules/quicksearch/SearchResultRender.java 
        |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/ui/search/SearchResultRenderer.java
 
b/bugtracking/src/org/netbeans/modules/bugtracking/ui/search/SearchResultRenderer.java
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/ui/search/SearchResultRenderer.java
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/ui/search/SearchResultRenderer.java
@@ -79,7 +79,7 @@
     public Component getListCellRendererComponent(JList list, Object value, 
int index, boolean isSelected, boolean cellHasFocus) {
         if (!(value instanceof PopupItem)) {
             BugtrackingManager.LOG.log(Level.WARNING, "wrong search list 
item {0}", value); // NOI18N
-            return null;
+            return new JLabel();
         }
 
         PopupItem item = (PopupItem) value;
diff --git 
a/spi.quicksearch/src/org/netbeans/modules/quicksearch/SearchResultRender.java
 
b/spi.quicksearch/src/org/netbeans/modules/quicksearch/SearchResultRender.java
--- 
a/spi.quicksearch/src/org/netbeans/modules/quicksearch/SearchResultRender.java
+++ 
b/spi.quicksearch/src/org/netbeans/modules/quicksearch/SearchResultRender.java
@@ -91,7 +91,7 @@
 
     public Component getListCellRendererComponent(JList list, Object value, 
int index, boolean isSelected, boolean cellHasFocus) {
         if (!(value instanceof ItemResult)) {
-            return null;
+            return new JLabel();
         }
 
         ItemResult ir = (ItemResult) value;

[hg] main-silver: #219864 - NPE when rendering a JList

S. Aubrecht 06/28/2013

Project Features

About this Project

ConnectedDeveloper was started in November 2009, is owned by tpavek, and has 66 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