[PATCH] This guess was not always correct

Wald Commits scm-commit at wald.intevation.org
Thu Jun 12 12:26:34 CEST 2014


# HG changeset patch
# User "Tom Gottfried <tom at intevation.de>"
# Date 1402568765 -7200
# Node ID 5b3c795385ef1006514a54f3e877b293ef49e6b5
# Parent  07cc4cd9233e5c97cc847290a38b8bf65aa11ba9
This guess was not always correct.

diff -r 07cc4cd9233e -r 5b3c795385ef artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadCalculate.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadCalculate.java	Thu Jun 12 12:21:55 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadCalculate.java	Thu Jun 12 12:26:05 2014 +0200
@@ -32,7 +32,7 @@
 import org.dive4elements.river.artifacts.model.minfo.SedimentLoadUnknownFacet;
 import org.dive4elements.river.artifacts.resources.Resources;
 import org.dive4elements.river.artifacts.states.DefaultState;
-import org.dive4elements.river.utils.DateGuesser;
+import org.dive4elements.river.utils.DateUtil;
 
 /** State in which Sediment Load(s) are calculated/retrieved. */
 public class SedimentLoadCalculate
@@ -103,9 +103,9 @@
                         for (int[] date: dates) {
                             try {
                                 Date s =
-                                    DateGuesser.guessDate(String.valueOf(date[0]));
+                                    DateUtil.getStartDateFromYear(date[0]);
                                 Date e =
-                                    DateGuesser.guessDate(String.valueOf(date[1]));
+                                    DateUtil.getEndDateFromYear(date[0]);
                                 if (!(s.after(load.getEnd()) ||
                                       e.before(load.getStart()))) {
                                     return Boolean.TRUE;


More information about the Dive4Elements-commits mailing list