[PATCH 3 of 7] SedimentLoadFactory: Minor simplification

Wald Commits scm-commit at wald.intevation.org
Thu Sep 5 15:37:48 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1378387676 -7200
# Node ID 69bf96202df4b4751e874b06e61ac6f5e6c86f70
# Parent  5a348e3df0f8147803d1ee815f0a76c6d0e1017f
SedimentLoadFactory: Minor simplification.

diff -r 5a348e3df0f8 -r 69bf96202df4 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java	Thu Sep 05 15:23:54 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java	Thu Sep 05 15:27:56 2013 +0200
@@ -495,21 +495,19 @@
         if (stations.ceilingEntry(km + 0.1d) != null) {
             nextStation = stations.ceilingEntry(km + 0.1d).getValue();
         }
-        Range range = null;
         if (station == null) {
             return null;
         }
         else {
             if (nextStation != null)
-                range = new Range(station.getRange().getA().doubleValue(),
+                return new Range(station.getRange().getA().doubleValue(),
                     nextStation.getRange().getA().doubleValue());
             else {
                 // TODO end-of-river instead of B.
-                range = new Range(station.getRange().getA().doubleValue(),
+                return new Range(station.getRange().getA().doubleValue(),
                     station.getRange().getB().doubleValue());
             }
         }
-        return range;
     }
 
     /**


More information about the Dive4elements-commits mailing list