diff src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java @ 664:0002475bc23d

Fixed Index out of Bounds exception in validation.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 13 May 2015 13:57:23 +0200
parents fa149968e60d
children 3118fbbe6292
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java	Wed May 13 13:56:29 2015 +0200
+++ b/src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java	Wed May 13 13:57:23 2015 +0200
@@ -28,6 +28,9 @@
     public Violation execute(Object object) {
         LProbe probe = (LProbe)object;
         String[] mediaDesk = probe.getMediaDesk().split(" ");
+        if (mediaDesk.length <= 1) {
+            return null;
+        }
         List<Integer> mediaIds = new ArrayList<Integer>();
         boolean zebs = false;
         Integer parent = null;
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)