CAMEL-24111: camel-xslt - Remove dead InputStream close logic in XsltBuilder#24780
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
gnodet
left a comment
There was a problem hiding this comment.
LGTM — clean removal of dead code.
Confirmed InputStream is is declared but never assigned in process() — the variable has been a no-op since 1565c9416423 (CAMEL-13851: "Refactoring to reuse as much code as possible from the xslt component") moved InputStream acquisition into XmlSourceHandlerFactoryImpl.getSource(). The IOHelper.close(null) call in the finally block was always a no-op.
Reviewed with Claude Code on behalf of @gnodet. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
oscerd
left a comment
There was a problem hiding this comment.
LGTM. This is genuinely dead code — the local InputStream is was declared = null and never assigned before the IOHelper.close(is) no-op, so removing the declaration, the close, and the now-unused IOHelper import is safe. (The fact that it still compiles with the declaration gone confirms is wasn't referenced anywhere else.) Nice cleanup.
Reviewed with Claude Code on behalf of Andrea Cosentino. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 472 tested, 29 compile-only — current: 472 all testedMaveniverse Scalpel detected 501 affected modules (current approach: 472).
|
…Builder Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
f58a500 to
da840aa
Compare
Summary
Claude Code on behalf of davsclaus
InputStream is = nullvariable andIOHelper.close(is)inXsltBuilder.process()that have been no-ops since the CAMEL-13851 SourceHandlerFactory refactoring (3.0)IOHelperimportThe variable was never assigned after the refactoring moved InputStream acquisition into
XmlSourceHandlerFactoryImpl.getSource(). The SAX/StAX parser chain closes the stream on all standard paths.Test plan
camel-xsltmodule builds cleanlycamel-corepassCo-Authored-By: Claude Opus 4.6 noreply@anthropic.com