[Dive4elements-commits] [PATCH] Skip calculation parameters if no bed diameter data exist in CSV exporter
Wald Commits
scm-commit at wald.intevation.org
Tue Jun 18 09:26:24 CEST 2013
# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1371540360 -7200
# Node ID e2b1057cee04eb01e51736f71e84a9679f06f75e
# Parent e1093f75a36f560c48b82b58f26f9e9caa395564
Skip calculation parameters if no bed diameter data exist in CSV exporter.
diff -r e1093f75a36f -r e2b1057cee04 artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java Tue Jun 18 09:09:42 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java Tue Jun 18 09:26:00 2013 +0200
@@ -122,6 +122,9 @@
row[ndx] = beds[k].getDiameterCap(km);
row[ndx + 1] = beds[k].getDiameterSub(km);
}
+ if (beds.length == 0) {
+ continue;
+ }
BedParametersResult[] params = results[j].getParameters();
for(int k = 0; k < params.length; k++) {
// loads.length + (beds.lenght * 2) * (j + 1): shift bed and bedload columns.
@@ -203,6 +206,9 @@
beds[j].getType().toString()) + " - " +
d1 + "-" + d2);
}
+ if (beds.length == 0) {
+ continue;
+ }
if (params.length > 0) {
header.add(
msg(CSV_HEADER_DENSITY_CAP, CSV_HEADER_DENSITY_CAP) +
More information about the Dive4elements-commits
mailing list