[PATCH] S/Q relation: Adjust sieves only once during construction

Wald Commits scm-commit at wald.intevation.org
Wed Dec 18 15:37:57 CET 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1387377473 -3600
# Node ID a4cef1b17b2b6f8a9805d86f82d58b732f6a347e
# Parent  cead6df5b7b3ec6da1e63cd513e6ea028659325a
S/Q relation: Adjust sieves only once during construction.

diff -r cead6df5b7b3 -r a4cef1b17b2b artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/Measurement.java
--- 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;
     }
 


More information about the Dive4elements-commits mailing list