comparison src/main/java/de/intevation/lada/validation/rules/messung/Date.java @ 1316:2c4a20e0bc92 release-2.5

Respect in validation rule that Messzeitpunkt might be null.
author Tom Gottfried <tom@intevation.de>
date Mon, 20 Mar 2017 15:17:20 +0100
parents 186d602e031a
children 18c789672b14
comparison
equal deleted inserted replaced
1312:2b4cd062f6a1 1316:2c4a20e0bc92
44 Probe probe = (Probe) response.getData(); 44 Probe probe = (Probe) response.getData();
45 if (probe == null) { 45 if (probe == null) {
46 Map<String, Integer> errors = new HashMap<String, Integer>(); 46 Map<String, Integer> errors = new HashMap<String, Integer>();
47 errors.put("lprobe", 604); 47 errors.put("lprobe", 604);
48 } 48 }
49 if (probe.getProbeentnahmeEnde() == null || 49 if (messung.getMesszeitpunkt() != null) {
50 probe.getProbeentnahmeEnde().after(messung.getMesszeitpunkt())) { 50 if (probe.getProbeentnahmeEnde() == null ||
51 Violation violation = new Violation(); 51 probe.getProbeentnahmeEnde().after(messung.getMesszeitpunkt())) {
52 violation.addWarning("messzeitpunkt", 632); 52 Violation violation = new Violation();
53 return violation; 53 violation.addWarning("messzeitpunkt", 632);
54 return violation;
55 }
54 } 56 }
55 return null; 57 return null;
56 } 58 }
57 } 59 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)