hudi-agent commented on code in PR #19784:
URL: https://github.com/apache/hudi/pull/19784#discussion_r3953649594


##########
hudi-io/src/main/java/org/apache/hudi/common/util/ReflectionUtils.java:
##########


Review Comment:
   🤖 **Line 227:** Following up on the earlier thread: with 
`setUseCaches(false)` this `JarFile` is a fresh handle owned by this method, 
and it's still never closed. Since `classes` is fully materialized before 
`return classes.stream()`, could you wrap it in `try (JarFile jarFile = 
connection.getJarFile()) { ... }`? That closes the descriptor without affecting 
other readers (the cache concern only applied when `useCaches` was true).
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to