[Dive4elements-commits] [PATCH] SedimentDensityParser: don't try to guess year from comment column

Wald Commits scm-commit at wald.intevation.org
Thu Mar 28 16:43:23 CET 2013


# HG changeset patch
# User Tom Gottfried <tom.gottfried at intevation.de>
# Date 1364485400 -3600
# Node ID c6e552348934d02b82157869c438741a8e182b91
# Parent  db6c7268b08ebeb06b1c6b70d2679a8937ddf07e
SedimentDensityParser: don't try to guess year from comment column

diff -r db6c7268b08e -r c6e552348934 flys-backend/src/main/java/de/intevation/flys/importer/parsers/SedimentDensityParser.java
--- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/SedimentDensityParser.java	Thu Mar 28 16:41:30 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/SedimentDensityParser.java	Thu Mar 28 16:43:20 2013 +0100
@@ -150,21 +150,6 @@
 	}
 
         BigDecimal year = null;
-        try {
-            year =
-                new BigDecimal(nf.parse(vals[vals.length - 1]).doubleValue());
-        }
-        catch(ParseException pe) {
-            try {
-                Date d = DateGuesser.guessDate(vals[vals.length - 1]);
-                Calendar c = Calendar.getInstance();
-                c.setTime(d);
-                year = new BigDecimal(c.get(Calendar.YEAR));
-            }
-            catch (IllegalArgumentException iae) {
-                log.warn("Could not parse date in '" + line + "'");
-            }
-        }
 
         current.addValue(new ImportSedimentDensityValue(
             km,


More information about the Dive4elements-commits mailing list