changeset 7065:b17634649e61

Simplify code a bit.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 19 Sep 2013 12:53:11 +0200 (2013-09-19)
parents fabb5e7a3b66
children 39237f4985a7
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java
diffstat 1 files changed, 6 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java	Thu Sep 19 12:52:06 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java	Thu Sep 19 12:53:11 2013 +0200
@@ -243,23 +243,16 @@
         resLoad.setDescription("");
         resLoad.setEpoch(true);
 
-        SedimentLoadResult result;
         SedimentLoad sl = calculateTotalLoad(resLoad, this.epoch[i][0]);
+
         if (this.unit.equals("m3_per_a")) {
-            SedimentLoad slu = calculateUnit(sl, this.epoch[i][0]);
-            result = new SedimentLoadResult(
-                this.epoch[i][0],
-                this.epoch[i][1],
-                slu);
-        }
-        else {
-            result = new SedimentLoadResult(
-                this.epoch[i][0],
-                this.epoch[i][1],
-                sl);
+            sl = calculateUnit(sl, this.epoch[i][0]);
         }
 
-        return result;
+        return new SedimentLoadResult(
+            this.epoch[i][0],
+            this.epoch[i][1],
+            sl);
     }
 
     /**

http://dive4elements.wald.intevation.org