[PATCH 2 of 2] (issue1620) join column names with two empty spaces
Wald Commits
scm-commit at wald.intevation.org
Fri Nov 29 11:13:48 CET 2013
# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1385720011 -3600
# Node ID edb323a4c2866af88b56cb53e5fd3878ea4cef3f
# Parent 3e3a4f44423a8fce138170b42bac6ea187ddc8a4
(issue1620) join column names with two empty spaces
The size limit of 9 characters is already enforced in addcolumn
so this can be safely removed.
diff -r 3e3a4f44423a -r edb323a4c286 artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java Fri Nov 29 11:12:31 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java Fri Nov 29 11:13:31 2013 +0100
@@ -816,7 +816,7 @@
// for details.
for (WQKms wqkms: officalFixings) {
// To add some spaces here or to add them in the writer,..
- writer.addColumn(" " + getDesc(wqkms, true));
+ writer.addColumn(getDesc(wqkms, true));
// Get all lines from the calculation
Map <Double, WstLine> calcLines = writer.getLines();
diff -r 3e3a4f44423a -r edb323a4c286 artifacts/src/main/java/org/dive4elements/river/exports/WstWriter.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WstWriter.java Fri Nov 29 11:12:31 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/WstWriter.java Fri Nov 29 11:13:31 2013 +0100
@@ -22,6 +22,7 @@
import java.util.TreeMap;
import org.apache.log4j.Logger;
+import org.apache.commons.lang.StringUtils;
import org.dive4elements.river.artifacts.model.WstLine;
@@ -165,9 +166,7 @@
writer.println(cols);
writer.print(" ");
- for (String columnName: columnNames) {
- writer.printf(locale, "%9s", columnName);
- }
+ writer.print(StringUtils.join(columnNames, " "));
writer.println();
More information about the Dive4elements-commits
mailing list