[Lada-commits] [PATCH] Stop probe import if probe is a duplicate and set better error code

Wald Commits scm-commit at wald.intevation.org
Fri Apr 7 09:05:06 CEST 2017


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1491548700 -7200
# Node ID 3f6a77c9efc904863e0a1336e0d2c5266a2179cc
# Parent  ffbf9cff4aa6f6c1eb58a42fba7e08702ff0ddc6
Stop probe import if probe is a duplicate and set better error code.

diff -r ffbf9cff4aa6 -r 3f6a77c9efc9 src/main/java/de/intevation/lada/importer/laf/LafObjectMapper.java
--- a/src/main/java/de/intevation/lada/importer/laf/LafObjectMapper.java	Fri Apr 07 08:53:41 2017 +0200
+++ b/src/main/java/de/intevation/lada/importer/laf/LafObjectMapper.java	Fri Apr 07 09:05:00 2017 +0200
@@ -166,7 +166,7 @@
             // Probe was found but some data does not match
             else if(i == Identified.REJECT){
                 ReportItem err = new ReportItem();
-                err.setCode(631);
+                err.setCode(671);
                 err.setKey("duplicate");
                 err.setValue("");
                 currentErrors.add(err);
@@ -178,6 +178,7 @@
                     warnings.put(object.getIdentifier(),
                         new ArrayList<ReportItem>(currentWarnings));
                 }
+                return;
             }
             // It is a brand new probe!
             else if(i == Identified.NEW){


More information about the Lada-commits mailing list