spring-projects / spring-projects/spring-data-commons

QueryDSL bindings treat empty parameters inconsistently [DATACMNS-1784]

Open
#2,199 1 comment 0 reactions 1 assignee View on GitHub

@christophstrobl is already working on this.

Since Dec 30, 2020.

in: web type: bug
Dominant language
Java
Stars
838
Forks
730
PR merge metrics
No merged PRs in 30d

Description

James Howe opened DATACMNS-1784 and commented

The MVC binding treats empty request parameters inconsistently.

A single empty parameter will be ignored, but if there are multiple then they are passed as null (or "" for String types, [] for arrays).

  • ?foo= — no binding created
  • ?foo=1— one value: [1]
  • ?foo=1&foo= — two values: [1, null]
  • ?foo=&foo= — two values: [null, null]

This leads to inconsistent behaviour, including NPEs in QuerydslBinderCustomizer and such


Affects: 2.3.2 (Neumann SR2)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.