# HG changeset patch # User Raimund Renkert # Date 1340205644 0 # Node ID 71484036b6aea6f91ed55382c94d997abad8d3ea # Parent fe9be7ccc5e887bd7d7eb3ac2d2c5cb11245ec1f FixA: Moved function instantiation to always have a valid function instance. flys-artifacts/trunk@4728 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r fe9be7ccc5e8 -r 71484036b6ae flys-artifacts/ChangeLog --- 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 + + * 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 * src/main/java/de/intevation/flys/artifacts/model/Parameters.java: diff -r fe9be7ccc5e8 -r 71484036b6ae flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/Fitting.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)) {