[Geoserver-devel] [JIRA] (GEOS-7453) REST API PUT featuretype request disables layer

Torben Barsballe created an issue

GeoServer / BugGEOS-7453

REST API PUT featuretype request disables layer

Issue Type:

BugBug

Affects Versions:

2.8.2, 2.7.6, 2.6.5

Assignee:

Torben Barsballe

Components:

REST

Created:

10/Mar/16 7:08 PM

Priority:

MediumMedium

Reporter:

Torben Barsballe

When doing a PUT request against a feature type to change the cqlFilter, any layers backed by that featureType get disabled.

curl -v -u admin:geoserver -XPUT -H "Content-type: text/xml" http://localhost:8080/geoserver/rest/workspaces/sf/datastores/sf/featuretypes/roads -d "<featureType><cqlFilter>label=''</cqlFilter></featureType>"

It looks like this occurs because GeoServer is constructing a new FeatureTypeInfo object from the request parameters, then copying all non-null values to the FeatureTypeInfo object in the catalog. Since enabled is a boolean primitive, it is initialized to false and copied, casing the FeatureTypeInfo object to become disabled.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v7.2.0-OD-03-014#72000-sha1:1e7aa97)

Atlassian logo