[Dive4elements-commits] [PATCH 2 of 7] Never return 'null' for bed(load) diameters

Wald Commits scm-commit at wald.intevation.org
Tue Jun 11 09:21:28 CEST 2013


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1370934852 -7200
# Node ID 11d76162eca171402e814b4ee454b66b238026ca
# Parent  165f60f420cfc14ce8dcac761c0e317fdc36ac24
Never return 'null' for bed(load) diameters.

diff -r 165f60f420cf -r 11d76162eca1 artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedQualityAccess.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedQualityAccess.java	Tue Jun 11 09:12:35 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedQualityAccess.java	Tue Jun 11 09:14:12 2013 +0200
@@ -8,6 +8,7 @@
 
 package org.dive4elements.river.artifacts.access;
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.LinkedList;
 import java.util.List;
@@ -48,6 +49,9 @@
         if (bedDiameter == null && value != null) {
             bedDiameter = extractDiameter(value);
         }
+        if (bedDiameter == null) {
+            return new ArrayList<String>();
+        }
         return bedDiameter;
     }
 
@@ -56,6 +60,9 @@
         if (bedloadDiameter == null && value != null) {
             bedloadDiameter = extractDiameter(value);
         }
+        if (bedloadDiameter == null) {
+            return new ArrayList<String>();
+        }
         return bedloadDiameter;
     }
 


More information about the Dive4elements-commits mailing list