Global handling in ContactPage
------------------------------
Key: GEOS-3416
URL: http://jira.codehaus.org/browse/GEOS-3416
Project: GeoServer
Issue Type: Bug
Components: UI
Reporter: Emanuele Tajariol
Assignee: Andrea Aime
In file org.geoserver.web.admin.ContactPage, the lines that perform the data update are:
38: gs.getGlobal().setContact((ContactInfo)contactModel.getObject());
39: gs.save(gs.getGlobal());
These lines assume that the global value is stored somewhere else, so that its values can be updated in a call and then persisted in another one.
If the GeoServer implementation creates a new GeoServerInfo instance at every getGlobal() call, the setContext() call on line 38 will change the value in a volatile instance, and the call on line 39 will save the GeoServerInfo just retrieved, so that nothing will be really updated.
The proposed code change just handles a local GeoServerInfo instance:
GeoServerInfo global = gs.getGlobal();
global.setContact((ContactInfo)contactModel.getObject());
gs.save(global);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira