From: Patrick Plitzner Date: Wed, 9 Sep 2015 12:42:21 +0000 (+0200) Subject: Fixed potnetial NPE X-Git-Tag: 3.8.0^2~15 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/89000ff8fc1ce58f27855812fd3cac7eea87f0bf Fixed potnetial NPE --- diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java index e5861f668..cc437488a 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java @@ -121,7 +121,10 @@ public class SearchManager { String titleSearchString = configurator.getTitleSearchString(); try { UUID uuid = UUID.fromString(titleSearchString); - records.add(CdmStore.getService(service).find(uuid)); + T foundRecord = CdmStore.getService(service).find(uuid); + if(foundRecord!=null){ + records.add(foundRecord); + } } catch (IllegalArgumentException e) { //search string was no UUID }