From 5cb9198ada58dc2a2e26ef1cf84cf95b7da5ce66 Mon Sep 17 00:00:00 2001 From: briancaruso Date: Thu, 30 Jun 2011 22:41:56 +0000 Subject: [PATCH] Fixing NPE in SolrPagedSearchController NIHVIVO-2809 --- .../webapp/search/controller/SolrPagedSearchController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/search/controller/SolrPagedSearchController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/search/controller/SolrPagedSearchController.java index 975e8e800..d5bcf30d9 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/search/controller/SolrPagedSearchController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/search/controller/SolrPagedSearchController.java @@ -397,7 +397,8 @@ public class SolrPagedSearchController extends FreemarkerHttpServlet { if( VitroVocabulary.OWL_THING.equals(typeUri)) continue; VClass type = vclassDao.getVClassByURI(typeUri); - if( ! type.isAnonymous() && + if( type != null && + ! type.isAnonymous() && type.getName() != null && !"".equals(type.getName()) && type.getGroupURI() != null ) //don't display classes that aren't in classgroups classes.add(type);