changeset 379:95ff5a25a339

Avoid adding duplicated facets in DefaultOutput.addFacet(). artifacts/trunk@4185 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 30 Mar 2012 07:21:29 +0000
parents 71ff234713a6
children 9798e4d83681
files ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultOutput.java
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Feb 10 12:33:57 2012 +0000
+++ b/ChangeLog	Fri Mar 30 07:21:29 2012 +0000
@@ -1,3 +1,8 @@
+2012-03-30  Ingo Weinzierl <ingo@intevation.de>
+
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultOutput.java:
+	  Avoid adding duplicated facets into the output in addFacet().
+
 2012-02-10	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* artifact-database/src/main/java/de/intevation/artifactdatabase/state/Facet.java,
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultOutput.java	Fri Feb 10 12:33:57 2012 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultOutput.java	Fri Mar 30 07:21:29 2012 +0000
@@ -132,7 +132,9 @@
 
 
     public void addFacet(Facet facet) {
-        facets.add(facet);
+        if (facet != null && !facets.contains(facet)) {
+            facets.add(facet);
+        }
     }
 
 

http://dive4elements.wald.intevation.org