[Geoserver-devel] [JIRA] (GEOS-10371) NullPointerException logged when removing LayerGroup with null workspace

Gabriel Roldan created an issue

GeoServer / BugGEOS-10371

NullPointerException logged when removing LayerGroup with null workspace

Issue Type:

BugBug

Assignee:

Gabriel Roldan

Created:

26/Jan/22 8:16 PM

Priority:

MediumMedium

Reporter:

Gabriel Roldan

SecuredResourceNameChangeListener doesn’t check if a LayerGroup.getWorkspace() is null, resuling in an NPE, logged as a warning:

26 Jan 16:13:06 WARN [catalog.impl] - Catalog listener threw exception handling event.
java.lang.NullPointerException
	at org.geoserver.security.SecuredResourceNameChangeListener.handleRemoveEvent(SecuredResourceNameChangeListener.java:62)
	at org.geoserver.catalog.impl.CatalogImpl.event(CatalogImpl.java:1882)
	at org.geoserver.catalog.impl.CatalogImpl.fireRemoved(CatalogImpl.java:1871)
	at org.geoserver.catalog.impl.CatalogImpl.removed(CatalogImpl.java:1819)
	at org.geoserver.catalog.impl.CatalogImpl.remove(CatalogImpl.java:1128)
	at org.geoserver.security.SecureCatalogImpl.remove(SecureCatalogImpl.java:1452)
	at org.geoserver.catalog.impl.AbstractFilteredCatalog.remove(AbstractFilteredCatalog.java:760)
	at org.geoserver.catalog.impl.AbstractCatalogDecorator.remove(AbstractCatalogDecorator.java:515)
	at org.geoserver.catalog.impl.LocalWorkspaceCatalog.remove(LocalWorkspaceCatalog.java:424)
	at org.geoserver.catalog.CascadeDeleteVisitor.visit(CascadeDeleteVisitor.java:381)
	at org.geoserver.security.decorators.DecoratingLayerGroupInfo.accept(DecoratingLayerGroupInfo.java:191)
	at org.geoserver.web.data.SelectionRemovalLink$1.onSubmit(SelectionRemovalLink.java:71)
	at org.geoserver.web.wicket.GeoServerDialog.submit(GeoServerDialog.java:148)
	at org.geoserver.web.wicket.GeoServerDialog$1.onSubmit(GeoServerDialog.java:160)
	at org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:111)
	at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$AjaxFormSubmitter.onSubmit(AjaxFormSubmitBehavior.java:218)
...

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100189-sha1:c51f787)

Atlassian logo