Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java @ 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 | e9337488bac3 |
children | ec5c75da5c7a |
comparison
equal
deleted
inserted
replaced
839:6a1cd38e6e18 | 840:18fc7afe0251 |
---|---|
45 public DefaultCollection(String uuid, long ttl) { | 45 public DefaultCollection(String uuid, long ttl) { |
46 this.uuid = uuid; | 46 this.uuid = uuid; |
47 this.ttl = ttl; | 47 this.ttl = ttl; |
48 this.items = new ArrayList<CollectionItem>(); | 48 this.items = new ArrayList<CollectionItem>(); |
49 this.themeLists = new HashMap<String, ThemeList>(); | 49 this.themeLists = new HashMap<String, ThemeList>(); |
50 this.recommendations = new ArrayList<Recommendation>(); | |
50 } | 51 } |
51 | 52 |
52 | 53 |
53 /** | 54 /** |
54 * Creates a new DefaultCollection with a UUID. | 55 * Creates a new DefaultCollection with a UUID. |
66 String uuid, | 67 String uuid, |
67 long ttl, | 68 long ttl, |
68 List<Recommendation> recommendations, | 69 List<Recommendation> recommendations, |
69 Map<String, ThemeList> themeLists) | 70 Map<String, ThemeList> themeLists) |
70 { | 71 { |
71 this(uuid, ttl, new ArrayList<Recommendation>()); | 72 this(uuid, ttl, recommendations); |
72 this.recommendations = recommendations; | 73 this.themeLists = themeLists; |
73 this.themeLists = themeLists; | |
74 } | 74 } |
75 | 75 |
76 | 76 |
77 /** | 77 /** |
78 * Creates a new DefaultCollection with uuid and name. | 78 * Creates a new DefaultCollection with uuid and name. |