# HG changeset patch # User Sascha L. Teichmann # Date 1350295228 -7200 # Node ID 9c78264109ad93820add168769d72ee4466b4425 # Parent c722c08cf502961d8ec2869a17309f829066d1da AFT: Ignored tables with unset GUELTIG_VON or GUELTIG_BIS values. diff -r c722c08cf502 -r 9c78264109ad .hgignore --- a/.hgignore Mon Oct 15 09:31:50 2012 +0200 +++ b/.hgignore Mon Oct 15 12:00:28 2012 +0200 @@ -14,6 +14,11 @@ flys-client/\.project # eclipse flys-client/\.settings # eclipse flys-client/test-output # eclipse junit/testng plugin output +flys-aft/target # maven output +flys-aft/\.classpath # eclipse +flys-aft/\.project # eclipse +flys-aft/\.settings # eclipse +flys-aft/test-output # eclipse junit/testng plugin output flys-client/src/main/webapp/OpenLayers-2.11 \.swp \.swo diff -r c722c08cf502 -r 9c78264109ad flys-aft/ChangeLog --- a/flys-aft/ChangeLog Mon Oct 15 09:31:50 2012 +0200 +++ b/flys-aft/ChangeLog Mon Oct 15 12:00:28 2012 +0200 @@ -1,3 +1,10 @@ +2012-09-15 Sascha L. Teichmann + + * ../.hgignore: Add ignores for flys-aft, too. + + * src/main/java/de/intevation/aft/DischargeTable.java: Ignore + tables with unset GUELTIG_VON or GUELTIG_BIS values. + 2012-09-11 Sascha L. Teichmann * README.txt: Added infos how to build. diff -r c722c08cf502 -r 9c78264109ad flys-aft/src/main/java/de/intevation/aft/DischargeTable.java --- a/flys-aft/src/main/java/de/intevation/aft/DischargeTable.java Mon Oct 15 09:31:50 2012 +0200 +++ b/flys-aft/src/main/java/de/intevation/aft/DischargeTable.java Mon Oct 15 12:00:28 2012 +0200 @@ -228,7 +228,21 @@ Date from = rs.getDate("GUELTIG_VON"); Date to = rs.getDate("GUELTIG_BIS"); - if (from != null && to != null && from.compareTo(to) > 0) { + if (from == null) { + log.warn("AFT: ABFLUSSTAFEL_NR = " + + dtId + ": GUELTIG_VON = NULL -> ignored."); + } + + if (to == null) { + log.warn("AFT: ABFLUSSTAFEL_NR = " + + dtId + ": GUELTIG_BIS = NULL -> ignored."); + } + + if (from == null || to == null) { + continue; + } + + if (from.compareTo(to) > 0) { log.warn("AFT: ABFLUSSTAFEL_NR = " + dtId + ": " + from + " > " + to + ". -> swap"); Date temp = from; @@ -252,9 +266,7 @@ double datumValue = rs.getDouble("PEGELNULLPUNKT"); Double datum = rs.wasNull() ? null : datumValue; - TimeInterval timeInterval = from == null - ? null - : new TimeInterval(from, to); + TimeInterval timeInterval = new TimeInterval(from, to); DischargeTable dt = new DischargeTable( dtId,