changeset 840:18fc7afe0251

Ensure list of recommendations is non-null after construction of DefaultCollection. flys-client/trunk@2560 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 24 Aug 2011 13:17:22 +0000
parents 6a1cd38e6e18
children e699adf3b092
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed Aug 24 13:14:42 2011 +0000
+++ b/flys-client/ChangeLog	Wed Aug 24 13:17:22 2011 +0000
@@ -1,3 +1,8 @@
+2011-08-24	Felix Wolfsteller	<felix.wolfsteller@intevation.de> 
+
+	* src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java:
+	Ensure list of recommendations is non-null after construction.
+
 2011-08-24	Felix Wolfsteller	<felix.wolfsteller@intevation.de> 
 
 	* src/main/java/de/intevation/flys/client/shared/model/DefaultRecommendation.java,
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java	Wed Aug 24 13:14:42 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java	Wed Aug 24 13:17:22 2011 +0000
@@ -47,6 +47,7 @@
         this.ttl        = ttl;
         this.items      = new ArrayList<CollectionItem>();
         this.themeLists = new HashMap<String, ThemeList>();
+        this.recommendations = new ArrayList<Recommendation>();
     }
 
 
@@ -68,9 +69,8 @@
         List<Recommendation> recommendations,
         Map<String, ThemeList> themeLists)
     {
-        this(uuid, ttl, new ArrayList<Recommendation>());
-        this.recommendations = recommendations;
-        this.themeLists      = themeLists;
+        this(uuid, ttl, recommendations);
+        this.themeLists = themeLists;
     }
 
 

http://dive4elements.wald.intevation.org