Mercurial > lada > lada-server
changeset 701:cb344bc264d9
Fixed deskriptor validation.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 10 Jul 2015 18:29:51 +0200 |
parents | d74b5b1190ae |
children | aa04157e4a60 |
files | src/main/java/de/intevation/lada/validation/rules/probe/Deskriptor.java src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/validation/rules/probe/Deskriptor.java Fri Jul 10 18:29:27 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/Deskriptor.java Fri Jul 10 18:29:51 2015 +0200 @@ -25,6 +25,9 @@ @Override public Violation execute(Object object) { LProbe probe = (LProbe)object; + if (probe.getMediaDesk() == null || probe.getMediaDesk().equals("")) { + return null; + } String[] mediaDesk = probe.getMediaDesk().split(" "); if (mediaDesk.length <= 1) { Violation violation = new Violation();
--- a/src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java Fri Jul 10 18:29:27 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java Fri Jul 10 18:29:51 2015 +0200 @@ -27,6 +27,9 @@ @Override public Violation execute(Object object) { LProbe probe = (LProbe)object; + if (probe.getMediaDesk() == null || probe.getMediaDesk().equals("")) { + return null; + } String[] mediaDesk = probe.getMediaDesk().split(" "); if (mediaDesk.length <= 1) { return null;