changeset 742:cae93c709548

Fixed NPE using the Presettings-Object without given Presettings. gnv-artifacts/trunk@781 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 16 Mar 2010 08:50:13 +0000
parents 2dc0666db49a
children a4b66195d55a
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Mon Mar 15 17:01:42 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Tue Mar 16 08:50:13 2010 +0000
@@ -1,3 +1,8 @@
+2010-03-16  Tim Englich  <tim.englich@intevation.de>
+
+	* src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java (fetchData): 
+	  BugFix: Fixed NPE using the Presettings-Object without given Presettings.
+
 2010-03-15  Tim Englich  <tim.englich@intevation.de>
 
 	* doc/conf/products/verticalprofile/conf_timeseriespoint.xml: 
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java	Mon Mar 15 17:01:42 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java	Tue Mar 16 08:50:13 2010 +0000
@@ -178,7 +178,9 @@
                                                   geometryWKT};
                     }else{
                         //Look into the presetting for an WKT
-                        InputData geometryWKTData = this.preSettings.get("geometry");
+                        InputData geometryWKTData = this.preSettings != null ? 
+                                                    this.preSettings.get("geometry") :
+                                                    null ;
                         if (geometryWKTData != null){
                             queryValues = new String[]{columns,
                                                        table,
@@ -190,7 +192,9 @@
                     }
                 }else{
                     //Look into the presetting for an WKT
-                    InputData geometryWKTData = this.preSettings.get("geometry");
+                    InputData geometryWKTData = this.preSettings != null ? 
+                                                this.preSettings.get("geometry") :
+                                                null ;
                     if (geometryWKTData != null){
                         queryValues = new String[]{columns,
                                                    table,

http://dive4elements.wald.intevation.org