Gabriel Roldán created GEOS-5081:
------------------------------------
Summary: Make the contract of the recently added Catalog.getLayerGroupByName(workspace, name) method more consistent
Key: GEOS-5081
URL: https://jira.codehaus.org/browse/GEOS-5081
Project: GeoServer
Issue Type: Improvement
Components: Configuration
Affects Versions: 2.2-beta1
Reporter: Gabriel Roldán
Assignee: Gabriel Roldán
Fix For: 2.2-beta2
Attachments: GEOS-5081.patch
We recently [improved the contract|https://fisheye.codehaus.org/changelog/geoserver/?cs=16929] of the recently added {{Catalog.getStyleByName(WorkspaceInfo ws, String name)}} method.
It's the turn of the {{Catalog.getLayerGroupByName}} family of methods. Problem is pretty much explained on the following comment in {{CatalogImplTest.testGetLayerGroupByNameWithWorkspace}} test case: "will randomly return one... we should probably return null with multiple matches".
So far the only real world user is the REST config API, which already parsed the requested workspace/layer group name out of the request URL, so it's worth fixing the method contract now that we're early in the game, before the issue catches up on us with other callers having to deal with the non deterministic behavior.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira