[Dive4elements-commits] [PATCH 2 of 2] ExtremeCalculation: Resolve probably too nested break

Wald Commits scm-commit at wald.intevation.org
Tue Nov 6 06:32:58 CET 2012


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1352180254 -3600
# Node ID d09dbff54e383bb55afd5d8c13e25c3c6b2c4368
# Parent  73200f5462fa1409c5e34e2f7715f866a115909d
ExtremeCalculation: Resolve probably too nested break.

diff -r 73200f5462fa -r d09dbff54e38 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/ExtremeCalculation.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/ExtremeCalculation.java	Tue Nov 06 06:36:54 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/ExtremeCalculation.java	Tue Nov 06 06:37:34 2012 +0100
@@ -200,16 +200,21 @@
                 log.debug("km: " + km);
             }
 
+            boolean foundRange = false;
+
             if (range == null || !range.inside(km)) {
                 for (RangeWithValues r: ranges) {
                     if (r.inside(km)) {
                         range = r;
+                        foundRange = true;
                         break;
                     }
                 }
                 // TODO: i18n
-                addProblem(km, "extreme.no.range.inner");
-                continue;
+                if (!foundRange) {
+                    addProblem(km, "extreme.no.range.inner");
+                    continue;
+                }
             }
 
             double [][] wqs = wst.interpolateTabulated(km);


More information about the Dive4elements-commits mailing list