changeset 4338:88064d351bcc

ExtremeCurveFacet: Moved allocation of Access object to where its needed.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 31 Oct 2012 14:08:38 +0100
parents 0a7594c0cbc2
children ff83ec9b4c0b
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/ExtremeCurveFacet.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/ExtremeCurveFacet.java	Wed Oct 31 14:02:00 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/ExtremeCurveFacet.java	Wed Oct 31 14:08:38 2012 +0100
@@ -61,8 +61,6 @@
         logger.debug("ExtremeCurveFacet.getData");
         if (artifact instanceof FLYSArtifact) {
             FLYSArtifact flys = (FLYSArtifact)artifact;
-            ExtremeAccess access = new ExtremeAccess(flys);
-
             CalculationResult res =
                 (CalculationResult) flys.compute(context,
                                                  ComputeType.ADVANCE,
@@ -80,6 +78,8 @@
                 logger.debug("A curve at km = " + currentKm);
                 Curve c = curveEntry.getValue();
                 // Find segment in which the curr. km is located.
+                ExtremeAccess access = new ExtremeAccess(flys);
+
                 double[] ds = access.getValuesForRange(currentKm);
 
                 if (ds != null) {

http://dive4elements.wald.intevation.org