# HG changeset patch # User Tom Gottfried # Date 1478006430 -3600 # Node ID c1713b7fbfa01f042ba8ce7612c7b14705b13d79 # Parent b2c3a59b40f8f9f748c4bb0cb7566b6a3e48a32e Use any identifier because idAlt might be null. In case null was used as a key, a serialization error occured. diff -r b2c3a59b40f8 -r c1713b7fbfa0 src/main/java/de/intevation/lada/importer/laf/LafObjectMapper.java --- a/src/main/java/de/intevation/lada/importer/laf/LafObjectMapper.java Tue Nov 01 14:19:11 2016 +0100 +++ b/src/main/java/de/intevation/lada/importer/laf/LafObjectMapper.java Tue Nov 01 14:20:30 2016 +0100 @@ -125,13 +125,12 @@ err.setKey(userInfo.getName()); err.setValue("Messstelle " + probe.getMstId()); currentErrors.add(err); - if (currentErrors.size() > 0) { - List copyErr = new ArrayList(currentErrors); - errors.put(probe.getIdAlt(), copyErr); - } + errors.put(object.getIdentifier(), + new ArrayList(currentErrors)); + if (currentWarnings.size() > 0) { - List copyWarn = new ArrayList(currentWarnings); - warnings.put(probe.getIdAlt(), copyWarn); + warnings.put(object.getIdentifier(), + new ArrayList(currentWarnings)); } return; } @@ -162,12 +161,12 @@ err.setValue(""); currentErrors.add(err); if (currentErrors.size() > 0) { - List copyErr = new ArrayList(currentErrors); - errors.put(probe.getIdAlt(), copyErr); + errors.put(object.getIdentifier(), + new ArrayList(currentErrors)); } if (currentWarnings.size() > 0) { - List copyWarn = new ArrayList(currentWarnings); - warnings.put(probe.getIdAlt(), copyWarn); + warnings.put(object.getIdentifier(), + new ArrayList(currentWarnings)); } return; } @@ -196,12 +195,12 @@ err.setValue("No valid Probe Object"); currentErrors.add(err); if (currentErrors.size() > 0) { - List copyErr = new ArrayList(currentErrors); - errors.put(probe.getIdAlt(), copyErr); + errors.put(object.getIdentifier(), + new ArrayList(currentErrors)); } if (currentWarnings.size() > 0) { - List copyWarn = new ArrayList(currentWarnings); - warnings.put(probe.getIdAlt(), copyWarn); + warnings.put(object.getIdentifier(), + new ArrayList(currentWarnings)); } return; } @@ -237,12 +236,12 @@ } if (currentErrors.size() > 0) { - List copyErr = new ArrayList(currentErrors); - errors.put(probe.getIdAlt(), copyErr); + errors.put(object.getIdentifier(), + new ArrayList(currentErrors)); } if (currentWarnings.size() > 0) { - List copyWarn = new ArrayList(currentWarnings); - warnings.put(probe.getIdAlt(), copyWarn); + warnings.put(object.getIdentifier(), + new ArrayList(currentWarnings)); } } @@ -265,7 +264,6 @@ return; } - // Compare with messung objects in the db Messung newMessung = null; try {