Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UndertowHeadersAdapter's remove() method violates Map contract #27592

Closed
sbrannen opened this issue Oct 22, 2021 · 0 comments
Closed

UndertowHeadersAdapter's remove() method violates Map contract #27592

sbrannen opened this issue Oct 22, 2021 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@sbrannen
Copy link
Member

The remove(Object key) method in UndertowHeadersAdapter should return any previous value stored under the key; however, the current implementation always returns null.

This has already been fixed in main as part of commit 785212d#diff-8be9fc708f521a68eb27761d98ddd6ebc62ec5431095673c7273647a538fae6bR132-R136.

@sbrannen sbrannen added in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug labels Oct 22, 2021
@sbrannen sbrannen added this to the 5.3.13 milestone Oct 22, 2021
@sbrannen sbrannen self-assigned this Oct 22, 2021
@sbrannen sbrannen added the for: backport-to-5.2.x Marks an issue as a candidate for backport to 5.2.x label Oct 22, 2021
@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.2.x Marks an issue as a candidate for backport to 5.2.x labels Oct 22, 2021
sbrannen added a commit to sbrannen/spring-framework that referenced this issue Oct 22, 2021
Prior to this commit, UndertowHeadersAdapter's remove() method violated
the java.util.Map contract by always returning null.

This commit fixes this by returning the previous list stored under the
specified key, and otherwise returning null if no previous value was
present.

Closes spring-projectsgh-27592
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants