mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Prior to this commit, ThrowawayClassLoader#loadClassFromResource opened an InputStream via getResourceAsStream(...) but never closed it. The stream leaked on both the success path (after defineClass) and the IOException path, as the surrounding try-block had neither a finally nor a try-with-resources clause. This commit adapts the existing inputStream variable as a try-with-resources resource so that it is closed on every path, leaving the loading logic unchanged. Closes gh-36933 Signed-off-by: junhyeong9812 <pickjog@gmail.com>