Setting WFSDataStoreFactory:MAXFEATURES does nothing, I expect it to limit the number of results

Description

This is something that used to work with GT 14.0, but no longer works when I upgraded to GT 21.2.

I'm unsure how to provide example code that doesn't release protected host names or connection IDs, but I'll do my best:

Creating a config as:

Does not have the desired effect of limiting queries.

I have verified that the code definitely doesn't seem to do what I expect it to:

https://github.com/geotools/geotools/blob/master/modules/unsupported/wfs-ng/src/main/java/org/geotools/data/wfs/internal/v1_x/StrictWFS_1_x_Strategy.java#L159

Only sets it for the query.

https://github.com/geotools/geotools/blob/master/modules/unsupported/wfs-ng/src/main/java/org/geotools/data/wfs/internal/GetFeatureRequest.java#L61

Requires the caller set the max features.

I think the easiest approach here is to set all of the parameters which can be set based off of the config in the GetFeatureRequest constructor, since that will propagate down correctly, and yet still allow for overrides.

Environment

None

Status

Assignee

Unassigned

Reporter

Mike Glazer

Triage

None

Components

Affects versions

21.2

Priority

Medium
Configure