[PATCH] (issue1755) Remove redundant conditional checks

Wald Commits scm-commit at wald.intevation.org
Tue Apr 14 17:57:15 CEST 2015


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1429027029 -7200
# Node ID 9cbbaedc6cba57e77d3fc4985c756e9303129b1e
# Parent  5b755d21c425515f63df7e771a8ae1495ae581e0
(issue1755) Remove redundant conditional checks.

diff -r 5b755d21c425 -r 9cbbaedc6cba artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java	Tue Apr 14 17:23:15 2015 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java	Tue Apr 14 17:57:09 2015 +0200
@@ -92,7 +92,7 @@
     protected void addValuesToResult(BedQualityResult result,
                                      BedQualityResultValue[] values) {
         for (BedQualityResultValue value: values) {
-            if (value.isEmpty() || value.isNaN() || !value.isInterpolateable()) {
+            if (!value.isInterpolateable()) {
                 if (value.isDiameterResult()) {
                     addProblem("bedquality.missing.diameter." +
                             value.getType(), value.getName().toUpperCase(),
@@ -103,7 +103,7 @@
                             value.getType(), result.getDateRange().getFrom(),
                             result.getDateRange().getTo());
                 }
-                if (!value.isInterpolateable() && (!value.isEmpty() && !value.isNaN())) {
+                if (!value.isEmpty() && !value.isNaN()) {
                     // we want to keep single point results
                     result.add(value);
                 }


More information about the Dive4Elements-commits mailing list