[PATCH] Workaround for flys/issue14070. TODO: Find the reason why a null document is given to the ThemeDocument

Wald Commits scm-commit at wald.intevation.org
Wed Sep 4 10:53:57 CEST 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1378284833 -7200
# Node ID 234b1a3b527d4b9d1bf58f2e2375181e0c22b0e2
# Parent  6bc333c162d1fc624b355412f87ae9934876becd
Workaround for flys/issue14070. TODO: Find the reason why a null document is given to the ThemeDocument.

diff -r 6bc333c162d1 -r 234b1a3b527d artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java
--- a/artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java	Tue Sep 03 21:51:58 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java	Wed Sep 04 10:53:53 2013 +0200
@@ -132,6 +132,11 @@
 
     private static Map<String, String> extractValues(Document document) {
         Map<String, String> values = new HashMap<String, String>();
+        if (document == null) {
+            logger.error("Invalid null document given.");
+            return values;
+        }
+
         NodeList fields = document.getElementsByTagName("field");
         for (int i = 0, N = fields.getLength(); i < N; ++i) {
             Element field = (Element)fields.item(i);


More information about the Dive4elements-commits mailing list