This is an automated email from the ASF dual-hosted git repository.
RocMarshal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 3aed2634768 [hotfix][flink-model-triton] Replaced the final resource
closing with try with resource
3aed2634768 is described below
commit 3aed2634768aec6f72763a9c6bebd7e70d9fc2c9
Author: Yuepeng Pan <[email protected]>
AuthorDate: Sun Sep 27 00:39:50 2026 +0800
[hotfix][flink-model-triton] Replaced the final resource closing with try
with resource
---
.../org/apache/flink/model/triton/TritonInferenceModelFunction.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git
a/flink-models/flink-model-triton/src/main/java/org/apache/flink/model/triton/TritonInferenceModelFunction.java
b/flink-models/flink-model-triton/src/main/java/org/apache/flink/model/triton/TritonInferenceModelFunction.java
index 46bd0e0a96c..be3a9d0a47f 100644
---
a/flink-models/flink-model-triton/src/main/java/org/apache/flink/model/triton/TritonInferenceModelFunction.java
+++
b/flink-models/flink-model-triton/src/main/java/org/apache/flink/model/triton/TritonInferenceModelFunction.java
@@ -315,7 +315,7 @@ public class TritonInferenceModelFunction extends
AbstractTritonModelFunction {
@Override
public void onResponse(Call call, Response
response)
throws IOException {
- try {
+ try (response) {
if (!response.isSuccessful()) {
// Let
handleErrorResponseWithRetry classify 4xx vs 5xx
// and route to retry /
default-value fallback. The
@@ -435,8 +435,6 @@ public class TritonInferenceModelFunction extends
AbstractTritonModelFunction {
e,
/* countAsBreakerFailure */
false,
/* retryable */ false);
- } finally {
- response.close();
}
}
});