We're updating the issue view to help you get more done. 

Changing the workspace of a style causes an ArrayIndexOutOfBounds exception

Description

Changing only the workspace of a style causes an ArrayIndexOutOfBoundsException to occur in the CatalogStyleChangeListener:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:418) at java.util.ArrayList.get(ArrayList.java:431) at org.geoserver.gwc.layer.CatalogStyleChangeListener.handleModifyEvent(CatalogStyleChangeListener.java:96) at org.geoserver.catalog.impl.CatalogImpl.event(CatalogImpl.java:1549) at org.geoserver.catalog.impl.CatalogImpl.fireModified(CatalogImpl.java:1518) at org.geoserver.catalog.impl.AbstractCatalogFacade.beforeSaved(AbstractCatalogFacade.java:83) at org.geoserver.catalog.impl.DefaultCatalogFacade.save(DefaultCatalogFacade.java:783) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.geoserver.catalog.LockingCatalogFacade.invoke(LockingCatalogFacade.java:36) at com.sun.proxy.$Proxy20.save(Unknown Source) at org.geoserver.catalog.impl.CatalogImpl.save(CatalogImpl.java:1444) at org.geoserver.security.SecureCatalogImpl.save(SecureCatalogImpl.java:1397) at org.geoserver.catalog.impl.AbstractFilteredCatalog.save(AbstractFilteredCatalog.java:765) at org.geoserver.catalog.impl.AbstractCatalogDecorator.save(AbstractCatalogDecorator.java:497) at org.geoserver.wms.web.data.StyleEditPage.onStyleFormSubmit(StyleEditPage.java:122) at org.geoserver.wms.web.data.AbstractStylePage$1.onSubmit(AbstractStylePage.java:141) at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1315) at org.apache.wicket.markup.html.form.Form.process(Form.java:976) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:797) at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:171)

Environment

None

Status

Assignee

Torben Barsballe

Reporter

Devon Tucker

Triage

Fix versions

Affects versions

2.11.2

Components

Priority

Medium