Skip to content

Always construct new exception on error in DefaultWebClient#28550

Closed
pokab wants to merge 1 commit into
spring-projects:mainfrom
idatahu:fix-webclient-memleak
Closed

Always construct new exception on error in DefaultWebClient#28550
pokab wants to merge 1 commit into
spring-projects:mainfrom
idatahu:fix-webclient-memleak

Conversation

@pokab

@pokab pokab commented Jun 1, 2022

Copy link
Copy Markdown
Contributor

Otherwise memory leak may occur due to repeated use of singleton exception. This is due to the ability for Throwable to contain a list of suppressed exceptions (and therefore being mutable) and the list to grow indefinitely.

@pivotal-cla

Copy link
Copy Markdown

@pokab Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla

Copy link
Copy Markdown

@pokab Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 1, 2022
@sbrannen sbrannen added in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 1, 2022
@sbrannen sbrannen added this to the 5.3.21 milestone Jun 1, 2022
@sbrannen sbrannen self-assigned this Jun 1, 2022
@sbrannen sbrannen changed the title Always construct new exception on error Always construct new exception on error in DefaultWebClient Jun 1, 2022
@sbrannen sbrannen closed this in 1d5ffaf Jun 1, 2022
@sbrannen

sbrannen commented Jun 1, 2022

Copy link
Copy Markdown
Member

Good catch.

This has been merged into 5.3.x and main.

Thanks for submitting your first PR to the Spring Framework! 👍

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) type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants