You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2025/03/06 06:34:32 UTC
(camel) branch main updated: CAMEL-19731 Implemented try-with-resources for MinioClient (#17364)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new c994b744d62 CAMEL-19731 Implemented try-with-resources for MinioClient (#17364)
c994b744d62 is described below
commit c994b744d623f3bd14c784c8d65e9a1030451a4d
Author: Dmitry Kryukov <dk...@users.noreply.github.com>
AuthorDate: Thu Mar 6 09:34:26 2025 +0300
CAMEL-19731 Implemented try-with-resources for MinioClient (#17364)
---
.../camel/component/minio/MinioComponentVerifierExtension.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioComponentVerifierExtension.java b/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioComponentVerifierExtension.java
index 4b0117f89f9..db44bc9da7c 100644
--- a/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioComponentVerifierExtension.java
+++ b/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioComponentVerifierExtension.java
@@ -89,8 +89,9 @@ public class MinioComponentVerifierExtension extends DefaultComponentVerifierExt
clientBuilderRequest.credentials(configuration.getAccessKey(), configuration.getSecretKey());
}
- MinioClient client = clientBuilderRequest.build();
- client.listBuckets();
+ try (MinioClient client = clientBuilderRequest.build()) {
+ client.listBuckets();
+ }
} catch (MinioException e) {
ResultErrorBuilder errorBuilder
= ResultErrorBuilder.withCodeAndDescription(VerificationError.StandardCode.AUTHENTICATION, e.getMessage())