changeset 4652:cf5ac1097d6a

WINFOArtifact: Tiny optimization, get data only when needed.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 07 Dec 2012 11:26:21 +0100
parents 83a42e6a562d
children a93699cb31eb
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java	Thu Dec 06 17:30:09 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java	Fri Dec 07 11:26:21 2012 +0100
@@ -1073,9 +1073,8 @@
      * @return the selected W values or null, if no W values are selected.
      */
     public double[] getWs() {
-        StateData dSingle = getData("wq_single");
-
         if (isW()) {
+            StateData dSingle = getData("wq_single");
             if (dSingle != null) {
                 return getSingleWQValues();
             }

http://dive4elements.wald.intevation.org