[PATCH] Small Java related cosmetics
Wald Commits
scm-commit at wald.intevation.org
Thu Jun 12 19:16:35 CEST 2014
# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1402593390 -7200
# Node ID d3a4b0d5bcd89645a4fa17299b59f04eba0a3fe4
# Parent 86f5a1577cc61254cac5593aebb0dc1bd72f10d4
Small Java related cosmetics.
diff -r 86f5a1577cc6 -r d3a4b0d5bcd8 artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java Thu Jun 12 12:29:03 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java Thu Jun 12 19:16:30 2014 +0200
@@ -25,6 +25,7 @@
import org.dive4elements.artifacts.CallMeta;
import org.dive4elements.river.artifacts.model.FacetTypes;
+import org.dive4elements.river.artifacts.model.W;
import org.dive4elements.river.artifacts.model.WQKms;
import org.dive4elements.river.artifacts.states.DefaultState;
@@ -221,7 +222,7 @@
}
double [] kms = new double[values[0].length];
Arrays.fill(kms, gauge.getStation().doubleValue());
- res.add(new WQKms(kms, values[0], values[1], name, WQKms.CENTIMETER_AT_GAUGE));
+ res.add(new WQKms(kms, values[0], values[1], name, W.CENTIMETER_AT_GAUGE));
return new CalculationResult(
res.toArray(new WQKms[res.size()]),
diff -r 86f5a1577cc6 -r d3a4b0d5bcd8 artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQ.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQ.java Thu Jun 12 12:29:03 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQ.java Thu Jun 12 19:16:30 2014 +0200
@@ -121,13 +121,13 @@
* If a conversion takes place converted is set to true
*/
public static WQ getFixedWQforExportAtGauge(WQ wq, BigDecimal datum) {
- if (wq.getReferenceSystem() == wq.CENTIMETER_AT_GAUGE) {
+ if (wq.getReferenceSystem() == W.CENTIMETER_AT_GAUGE) {
// Do nothing
return wq;
}
// If we convert we work on a copy to avoid side effects.
WQ ret = new WQ(wq.size(), wq.getName());
- ret.setReferenceSystem(wq.CENTIMETER_AT_GAUGE);
+ ret.setReferenceSystem(W.CENTIMETER_AT_GAUGE);
// When we convert and have a datum we have a calculated
// result at a gauge so we must subtract the datum.
diff -r 86f5a1577cc6 -r d3a4b0d5bcd8 artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java Thu Jun 12 12:29:03 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java Thu Jun 12 19:16:30 2014 +0200
@@ -374,7 +374,7 @@
* (in imported data they are set to -1 symbolically).
* Return false if data is null or empty
*/
- private boolean hasNoDischarge(double[][] data) {
+ private static boolean hasNoDischarge(double[][] data) {
if (data == null || data.length == 0) {
return false;
}
More information about the Dive4Elements-commits
mailing list