changeset 5476:f9eee1909e6e

Fix null pointer exception in ImportMeasurement Station Range may be null
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 27 Mar 2013 17:49:46 +0100
parents b6a6d13eec41
children ae60bb7b8085 11fba4dabe05
files flys-backend/src/main/java/de/intevation/flys/importer/ImportMeasurementStation.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportMeasurementStation.java	Wed Mar 27 16:26:50 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportMeasurementStation.java	Wed Mar 27 17:49:46 2013 +0100
@@ -64,7 +64,12 @@
                 log.error("Exception: " + e.getMessage());
             }
 
-            Range range = this.range.getPeer(river);
+            Range range = null;
+
+            if (this.range != null) {
+                range = this.range.getPeer(river);
+            }
+
             if (range == null) {
                 log.warn("No range found for measurement station'" + name + "'");
             }

http://dive4elements.wald.intevation.org