Skip to content

Pageable and Sort arguments with empty qualifier value shouldn't be prefixed with delimiter [DATACMNS-1827] #2242

Closed
@spring-projects-issues

Description

@spring-projects-issues

Vedran Pavic opened DATACMNS-1827 and commented

If Pageable or Sort controller method arguments are annotated with an empty string (the default value for Qualifier#value) the request parameters end up being prefixed with only qualifier delimiter, e.g. \_page and \_size (this assumes a default delimiter of \_).

Our use case is that we need to have multiple Pageable arguments resolved from the request, but have one that shouldn't be prefixed. Since having multiple arguments requires qualifying them, the logical option is to qualify one that shouldn't be prefixed with an empty qualifier value. However, this yields a bit awkward result, as explained above.

I classified this as a bug, because it feels like one, but I'd understand if it was reclassified as an enhancement. Either way, if you agree with the assessment that qualifier delimiter should be omitted in the case of empty qualifier value, I'd like to provide a PR to address this


Referenced from: pull request #473

Backported to: 2.4.1 (2020.0.1)

Metadata

Metadata

Assignees

Labels

in: webIntegration with Spring MVCtype: bugA general bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions