Mercurial > dive4elements > river
changeset 6962:234b1a3b527d
Workaround for flys/issue14070. TODO: Find the reason why a null document is given to the ThemeDocument.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 04 Sep 2013 10:53:53 +0200 |
parents | 6bc333c162d1 |
children | aa1d681ee6eb |
files | artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);