comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java @ 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 d23ad22bcfe7
children 1614b27dcbfa
comparison
equal deleted inserted replaced
741:2dc0666db49a 742:cae93c709548
176 table, 176 table,
177 where, 177 where,
178 geometryWKT}; 178 geometryWKT};
179 }else{ 179 }else{
180 //Look into the presetting for an WKT 180 //Look into the presetting for an WKT
181 InputData geometryWKTData = this.preSettings.get("geometry"); 181 InputData geometryWKTData = this.preSettings != null ?
182 this.preSettings.get("geometry") :
183 null ;
182 if (geometryWKTData != null){ 184 if (geometryWKTData != null){
183 queryValues = new String[]{columns, 185 queryValues = new String[]{columns,
184 table, 186 table,
185 where, 187 where,
186 geometryWKTData.getValue()}; 188 geometryWKTData.getValue()};
188 queryValues = new String[]{columns,table,where}; 190 queryValues = new String[]{columns,table,where};
189 } 191 }
190 } 192 }
191 }else{ 193 }else{
192 //Look into the presetting for an WKT 194 //Look into the presetting for an WKT
193 InputData geometryWKTData = this.preSettings.get("geometry"); 195 InputData geometryWKTData = this.preSettings != null ?
196 this.preSettings.get("geometry") :
197 null ;
194 if (geometryWKTData != null){ 198 if (geometryWKTData != null){
195 queryValues = new String[]{columns, 199 queryValues = new String[]{columns,
196 table, 200 table,
197 where, 201 where,
198 geometryWKTData.getValue()}; 202 geometryWKTData.getValue()};

http://dive4elements.wald.intevation.org