davsclaus commented on code in PR #25737:
URL: https://github.com/apache/camel/pull/25737#discussion_r3859883162


##########
components/camel-ibm/camel-ibm-watson-speech-to-text/src/main/java/org/apache/camel/component/ibm/watson/stt/WatsonSpeechToTextProducer.java:
##########
@@ -100,15 +101,18 @@ private void recognize(Exchange exchange) throws 
Exception {
         // Get audio input from header or body
         File audioFile = 
exchange.getIn().getHeader(WatsonSpeechToTextConstants.AUDIO_FILE, File.class);
         InputStream audioStream = null;
+        boolean ownStream = false;

Review Comment:
   Non-blocking question: per the project's Code Quality guidance, bug fixes 
should generally include a regression test, and this one doesn't (reasonably 
explained in the PR body — the module has no unit-testable path into 
`recognize()` without a live Watson client, and adding Mockito purely for this 
fix would be a new test dependency needing its own justification). That 
trade-off seems fine for a one-line leak fix. Just flagging in case there's an 
appetite for adding Mockito to this module down the line so leak-style fixes 
get regression coverage — or if "verified by module build + manual reasoning" 
is accepted practice for `camel-ibm-*` producers today.



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