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.
AbstractLookup.matches() dereferences Lookup.Item.getId() without checking for null. Suggest applying: diff -r 8149e6e1edc1 openide.util/src/org/openide/util/lookup/AbstractLookup.java --- a/openide.util/src/org/openide/util/lookup/AbstractLookup.java Mon Mar 17 10:19:49 2008 +0100 +++ b/openide.util/src/org/openide/util/lookup/AbstractLookup.java Tue Mar 18 20:54:44 2008 +0100 @@ -525,7 +525,7 @@ public class AbstractLookup extends Look static boolean matches(Template<?> t, Pair<?> item, boolean deepCheck) { String id = t.getId(); - if ((id != null) && !item.getId().equals(id)) { + if ((id != null) && !id.equals(item.getId())) { return false; }
I do not think this is a bug. You are not allowed to return null from getId(). Anyway, I have fixed it as you suggested: changeset: 75362:7221a9edf0cf tag: tip user: Jaroslav Tulach <jtulach@netbeans.org> date: Fri Mar 28 15:03:22 2008 +0100 summary: #130673: Preventing NPE when there is broken Pair impl