Mercurial > dive4elements > river
changeset 2309:92640472e563
Prevent duplicates in end kms for reference curve calculation.
flys-artifacts/trunk@3987 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 09 Feb 2012 10:08:14 +0000 |
parents | 41a5c87c2761 |
children | ecb76933362f |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Thu Feb 09 08:40:39 2012 +0000 +++ b/flys-artifacts/ChangeLog Thu Feb 09 10:08:14 2012 +0000 @@ -1,3 +1,8 @@ +2012-02-09 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java(getReferenceEndKms): + Prevent duplicates in end kms for reference curve calculation. + 2012-02-09 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java Thu Feb 09 08:40:39 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java Thu Feb 09 10:08:14 2012 +0000 @@ -738,7 +738,10 @@ for (String part: input.split("\\s+")) { try { - endKms.add(Double.parseDouble(part)); + double km = Double.parseDouble(part); + if (!endKms.contains(km)) { + endKms.add(km); + } } catch (NumberFormatException nfe) { logger.warn("reference end string is not numeric.");