[Dive4elements-commits] [PATCH] W80Parser: Return null if no year set to behave like other parsers and avoid
Wald Commits
scm-commit at wald.intevation.org
Mon Jan 7 11:49:42 CET 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1357556146 -3600
# Node ID 34398f424cfd8b03fc2beba594866d5d192a2b8c
# Parent 20b6ebf23916c8476263718ca8b5d5140442db9d
W80Parser: Return null if no year set to behave like other parsers and avoid
building a (wrong) TimeSpan object.
diff -r 20b6ebf23916 -r 34398f424cfd flys-backend/src/main/java/de/intevation/flys/importer/parsers/W80Parser.java
--- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/W80Parser.java Sat Jan 05 15:05:51 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/W80Parser.java Mon Jan 07 11:55:46 2013 +0100
@@ -83,7 +83,7 @@
@Override
public Integer getYear() {
if (anchorDate == null) {
- return Integer.valueOf(0);
+ return null;
}
Calendar dateCalendar = Calendar.getInstance();
dateCalendar.setTime(anchorDate);
More information about the Dive4elements-commits
mailing list