Source:
<code>private void saveWorkspace() { final Catalog catalog = getCatalog(); NamespaceInfo namespaceInfo = (NamespaceInfo) nsModel.getObject(); WorkspaceInfo workspaceInfo = (WorkspaceInfo) wsModel.getObject(); namespaceInfo.setIsolated(workspaceInfo.isIsolated()); namespaceInfo.setPrefix(workspaceInfo.getName()); catalog.validate(workspaceInfo, false).throwIfInvalid(); catalog.validate(namespaceInfo, false).throwIfInvalid(); catalog.save(workspaceInfo); catalog.save(namespaceInfo); if (basicInfoPanel.defaultWs) { catalog.setDefaultWorkspace(workspaceInfo); } GeoServer geoServer = getGeoServer(); Settings set = settingsPanel.set; if (set.enabled) { if (set.model instanceof NewSettingsModel) { geoServer.add(set.model.getObject()); } else { geoServer.save(set.model.getObject()); } } else { if (set.model instanceof ExistingSettingsModel) { geoServer.remove(set.model.getObject()); } } for (Service s : servicesPanel.services) { if (s.enabled) { if (s.model instanceof ExistingServiceModel) { continue; } geoServer.add(s.model.getObject()); } else { if (s.model instanceof ExistingServiceModel) { geoServer.remove(s.model.getObject()); } } } try { accessdataPanel.save(); } catch (Exception e) { LOGGER.log( Level.INFO, "Error saving access rules associated to workspace " + workspaceInfo.getName(), e); error(e.getMessage() == null ? e.toString() : e.getMessage()); } <START> doReturn(WorkspacePage.class); <END> }</code><technical_language>in case of error: * returning workspace list * error message appears there? in case of workspace save error service panel save error, exception shows in page instead (there is exception management there). try uniform if possible, if saving error happen oddball conditions, a full page exception is fine IMHO (and uniform rest of GeoServer UI). in case a service panel fails, exception appears in UI? Also, accessDataPanel field null if another security subsystem is setup, check if null attempting a save</technical_language>

Target:
private void saveWorkspace() { final Catalog catalog = getCatalog(); NamespaceInfo namespaceInfo = (NamespaceInfo) nsModel.getObject(); WorkspaceInfo workspaceInfo = (WorkspaceInfo) wsModel.getObject(); namespaceInfo.setIsolated(workspaceInfo.isIsolated()); namespaceInfo.setPrefix(workspaceInfo.getName()); catalog.validate(workspaceInfo, false).throwIfInvalid(); catalog.validate(namespaceInfo, false).throwIfInvalid(); catalog.save(workspaceInfo); catalog.save(namespaceInfo); if (basicInfoPanel.defaultWs) { catalog.setDefaultWorkspace(workspaceInfo); } GeoServer geoServer = getGeoServer(); Settings set = settingsPanel.set; if (set.enabled) { if (set.model instanceof NewSettingsModel) { geoServer.add(set.model.getObject()); } else { geoServer.save(set.model.getObject()); } } else { if (set.model instanceof ExistingSettingsModel) { geoServer.remove(set.model.getObject()); } } for (Service s : servicesPanel.services) { if (s.enabled) { if (s.model instanceof ExistingServiceModel) { continue; } geoServer.add(s.model.getObject()); } else { if (s.model instanceof ExistingServiceModel) { geoServer.remove(s.model.getObject()); } } } try { if (accessDataPanel != null) accessDataPanel.save(); doReturn(WorkspacePage.class); } catch (Exception e) { LOGGER.log( Level.INFO, "Error saving access rules associated to workspace " + workspaceInfo.getName(), e); error(e.getMessage() == null ? e.toString() : e.getMessage()); } }