changeset 4613:d440057b36f7

Fix differences/Waterlevelartifact.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 03 Dec 2012 10:51:01 +0100
parents 410a9292b71c
children 3a077fc360c2
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java
diffstat 1 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java	Sat Dec 01 23:24:36 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java	Mon Dec 03 10:51:01 2012 +0100
@@ -63,17 +63,22 @@
         if(filterFacets != null) {
             List<Facet> list = new ArrayList<Facet>();
             List<Facet> wlist = filterFacets.get(ChartType.LS);
-            for (Facet f: wlist) {
-                if (!f.getName().equals(LONGITUDINAL_Q)) {
-                    DefaultFacet df = new DefaultFacet(f.getIndex(),
-                        "longitudinal_section.q", "");
-                    list.add(df);
+            if (wlist == null) {
+                logger.warn("No matching filterfacets found");
+                dumpFilterFacets();
+            } else {
+                for (Facet f: wlist) {
+                    if (!f.getName().equals(LONGITUDINAL_Q)) {
+                        DefaultFacet df = new DefaultFacet(f.getIndex(),
+                            "longitudinal_section.q", "");
+                        list.add(df);
+                    }
                 }
-            }
 
-            list.addAll(wlist);
+                list.addAll(wlist);
 
-            filterFacets.put("w_differences", list);
+                filterFacets.put("w_differences", list);
+            }
         }
     }
 

http://dive4elements.wald.intevation.org