pjfanning opened a new pull request, #110: URL: https://github.com/apache/poi-xmlbeans/pull/110
`CodeGenUtil.externalCompile` never closed any of the three pipes it opens for the compiler process: - `proc.getOutputStream()` (stdin, which `javac` never reads) is left open; - the `BufferedReader`s wrapping stdout and stderr in `copy()` are never closed. That is three file descriptors per invocation, released only when the `Process` is finally collected. The drain threads were also never joined. `proc.waitFor()` returns as soon as the process exits, which can be before the reader threads have finished appending, so the compiler diagnostics printed immediately below could be truncated or empty — the `out` and `err` locals were assigned and then never used. This change closes stdin up front, joins both readers after `waitFor()`, destroys the process in a `finally`, and lets `copy()` close its reader once the pipe is drained. `compile.scomp.checkin.CompilationTests` (10 tests, all of which shell out to `javac` through this path) passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
