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

        

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to