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.

Comment From: pivotal-issuemaster

@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.

Comment From: pivotal-issuemaster

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

Comment From: snicoll

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