changeset 7708:a4cef1b17b2b

S/Q relation: Adjust sieves only once during construction.
author Sascha L. Teichmann <teichmann@intevation.de>
date Wed, 18 Dec 2013 15:37:53 +0100
parents cead6df5b7b3
children 0737573aa9ac
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/Measurement.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/Measurement.java	Wed Dec 18 12:39:18 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/Measurement.java	Wed Dec 18 15:37:53 2013 +0100
@@ -38,6 +38,9 @@
     public Measurement(Map<String, Object> data, List<Sieve> sieves) {
         this.data = data;
         this.sieves = sieves;
+        if (sieves != null && !sieves.isEmpty()) {
+            adjustSieves();
+        }
     }
 
     protected double get(String name) {
@@ -132,7 +135,8 @@
         if (sieveArray == null) {
             sieveArray = calculateSieveArray();
         }
-        adjustSieves();
+        // XXX: @rrenkert: Why did you place the adjument here?
+        // adjustSieves();
         return sieveArray;
     }
 

http://dive4elements.wald.intevation.org