changeset 6931:2c8e5bad8699

Fix NPE in case the artifact does not even have the master attribute Started happening with the new other.wqkms.w attribute condition and official lines in waterlevel calculations
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 27 Aug 2013 18:35:51 +0200
parents 750ce031e8e0
children b78d110135ec
files artifacts/src/main/java/org/dive4elements/river/themes/ThemeMapping.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/themes/ThemeMapping.java	Tue Aug 27 16:16:13 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/themes/ThemeMapping.java	Tue Aug 27 18:35:51 2013 +0200
@@ -133,7 +133,8 @@
         }
 
         // Test.
-        if (artifact.getDataAsString(parts[0]).equals(parts[1])) {
+        String artData = artifact.getDataAsString(parts[0]);
+        if (artData != null && artData.equals(parts[1])) {
             logger.debug("Matches master Attribute.");
             return true;
         }

http://dive4elements.wald.intevation.org