[Dive4elements-commits] [PATCH 1 of 2] WINFOArtifact: Tiny optimization, get data only when needed

Wald Commits scm-commit at wald.intevation.org
Fri Dec 7 11:22:10 CET 2012


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1354875981 -3600
# Node ID cf5ac1097d6a41328d116ac5d821c732a17ec1de
# Parent  83a42e6a562d657832d7fde64f6753844a146ddc
WINFOArtifact: Tiny optimization, get data only when needed.

diff -r 83a42e6a562d -r cf5ac1097d6a flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java
--- 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();
             }


More information about the Dive4elements-commits mailing list