changeset 528:ae40cf24f158

Prevent NPE when trying to add an empty facet list.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 28 Aug 2014 15:31:28 +0200
parents e149751b9c6d
children 6e29526b621a
files artifact-database/src/main/java/org/dive4elements/artifactdatabase/state/DefaultOutput.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifact-database/src/main/java/org/dive4elements/artifactdatabase/state/DefaultOutput.java	Tue Jul 08 18:35:13 2014 +0200
+++ b/artifact-database/src/main/java/org/dive4elements/artifactdatabase/state/DefaultOutput.java	Thu Aug 28 15:31:28 2014 +0200
@@ -140,7 +140,9 @@
 
 
     public void addFacets(List<Facet> facets) {
-        this.facets.addAll(facets);
+        if (facets != null) {
+            this.facets.addAll(facets);
+        }
     }
 
 

http://dive4elements.wald.intevation.org