[Geoserver-devel] [jira] Created: (GEOS-4856) StyleEditPage saves style before writing content, which is bad for Catalog listeners

StyleEditPage saves style before writing content, which is bad for Catalog listeners
------------------------------------------------------------------------------------

                 Key: GEOS-4856
                 URL: https://jira.codehaus.org/browse/GEOS-4856
             Project: GeoServer
          Issue Type: Bug
          Components: Configuration
    Affects Versions: 2.1.2
            Reporter: Milton Jonathan
            Assignee: Justin Deoliveira
            Priority: Minor
         Attachments: geos.style_save_order.patch

The method StyleEditPage.onStyleFormSubmit() is called whenever a Style is edited in the GeoServer UI. However, instead of writing out the style file first and then calling Catalog.save(), it goes the other way around. As it is, when Catalog listeners receive the handlePostModify event, the file content is still the old one.
Is there a special reason for calling Catalog.save() first? If not, the attached straightforward patch simply reverses the order and fixes the issue.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira