Project

General

Profile

« Previous | Next » 

Revision 6557

correctly check for missing config values during geoserver configuration

View differences:

src/edu/ucsb/nceas/metacat/admin/GeoserverAdmin.java
195 195

  
196 196
				
197 197
				// process the context/data dir
198
				if (context != null && dataDir != null) {
198
				if (context != null || dataDir != null) {
199
					validationErrors.add("Context and Data Directory cannot be null");
200
				} else {
199 201
					PropertyService.setPropertyNoPersist("geoserver.context", context);
200 202
					boolean reconfig = PropertyService.checkAndSetProperty(request, "geoserver.GEOSERVER_DATA_DIR");
201 203
					PropertyService.persistProperties();
......
204 206
					if (reconfig) {
205 207
						GeoserverUtil.writeConfig();
206 208
					}
207
				} else {
208
					validationErrors.add("Context and Data Directory cannot be null");
209 209
				}
210 210
				
211 211
				if (username == null || password == null) {

Also available in: Unified diff