[PATCH 3 of 5] (issue1755) Do not treat empty values as part of the result
Wald Commits
scm-commit at wald.intevation.org
Fri Mar 27 17:31:22 CET 2015
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1427473530 -3600
# Node ID 3c78fc83fc6d84202e69fee6d8ab60fd725bd1e3
# Parent 5a5331dd3e8dda8e0119716178d15b2ea9447590
(issue1755) Do not treat empty values as part of the result
diff -r 5a5331dd3e8d -r 3c78fc83fc6d artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityResult.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityResult.java Fri Mar 27 16:55:58 2015 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityResult.java Fri Mar 27 17:25:30 2015 +0100
@@ -40,6 +40,9 @@
}
public void add(BedQualityResultValue value) {
+ if (value.isEmpty()) {
+ return;
+ }
/* Add first is here to mimic the result sorting before
* a refactorization.*/
values.addFirst(value);
diff -r 5a5331dd3e8d -r 3c78fc83fc6d artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityResultValue.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityResultValue.java Fri Mar 27 16:55:58 2015 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityResultValue.java Fri Mar 27 17:25:30 2015 +0100
@@ -70,6 +70,10 @@
return name;
}
+ public boolean isEmpty() {
+ return data == null || data.length < 2 || data[0].length == 0;
+ }
+
public void setName(String name) {
this.name = name;
}
More information about the Dive4Elements-commits
mailing list