Skip to content

Conversation

alex-bel-apica
Copy link
Contributor

I noticed that Java process keeps lock on the keystore file when Netty+SSL is used on Windows.
Detailed investigation shown that it happens because InputStream is not closed after keystore is loaded from it.

This PR fixes the issue described above. I also found similar code in other places and fixed it as well.

@pivotal-issuemaster
Copy link

@alex-bel-apica Please sign the Contributor License Agreement!

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

See the FAQ for frequently asked questions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 5, 2021
@philwebb philwebb added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 5, 2021
@philwebb philwebb added this to the 2.3.x milestone Apr 5, 2021
@wilkinsona wilkinsona added the status: on-hold We can't start working on this issue yet label Apr 6, 2021
@pivotal-issuemaster
Copy link

@alex-bel-apica Thank you for signing the Contributor License Agreement!

@wilkinsona wilkinsona removed the status: on-hold We can't start working on this issue yet label Apr 6, 2021
@snicoll snicoll changed the title Use try-with-resources when loading keystores to properly close InputStream Keystore.load calls do not close InputStream Apr 8, 2021
@snicoll snicoll self-assigned this Apr 8, 2021
@snicoll snicoll modified the milestones: 2.3.x, 2.3.10 Apr 8, 2021
snicoll pushed a commit that referenced this pull request Apr 8, 2021
@snicoll snicoll closed this in 1d61da1 Apr 8, 2021
@snicoll
Copy link
Member

snicoll commented Apr 8, 2021

@alex-bel-apica thank you for making your first contribution to Spring Boot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants