changeset 3127:71484036b6ae

FixA: Moved function instantiation to always have a valid function instance. flys-artifacts/trunk@4728 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 20 Jun 2012 15:20:44 +0000
parents fe9be7ccc5e8
children 1dd6f30b0a76
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/Fitting.java
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Jun 20 15:03:29 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed Jun 20 15:20:44 2012 +0000
@@ -1,3 +1,8 @@
+2012-06-20  Raimund Renkert <raimund.renkert@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/model/fixings/Fitting.java:
+	  Moved function instantiation to alway have a valid function instance.
+
 2012-06-20  Raimund Renkert <raimund.renkert@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/Parameters.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/Fitting.java	Wed Jun 20 15:03:29 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/Fitting.java	Wed Jun 20 15:20:44 2012 +0000
@@ -178,15 +178,15 @@
                 return false;
             }
 
+            // This is the paraterized function for a given km.
+            instance = function.instantiate(parameters);
+
             if (!checkOutliers) {
                 break;
             }
 
             inputs.clear();
 
-            // This is the paraterized function for a given km.
-            instance = function.instantiate(parameters);
-
             for (int i = 0, N = xs.size(); i < N; ++i) {
                 double y = instance.value(xs.getQuick(i));
                 if (Double.isNaN(y)) {

http://dive4elements.wald.intevation.org