-
Bug
-
Resolution: Done
-
Undefined
-
None
-
None
-
Very Likely
-
0
The bug is in the org.apache.camel.component.minio.MinioProducer.deleteObjects() method.
Minio API expects client to iterate the target objects by themselves, but the MinioProducer.deleteObjects() has no iteration in the method.
https://min.io/docs/minio/linux/developers/java/API.html#removeobjects-removeobjectsargs-args
Removes multiple objects lazily. Its required to iterate the returned Iterable to perform removal.
rhi-camel-spring-boot-3.14.2.CR6-src/camel-3.14.2/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioProducer.java
private void deleteObjects(MinioClient minioClient, Exchange exchange) throws Exception { if (getConfiguration().isPojoRequest()) { RemoveObjectsArgs.Builder payload = exchange.getIn().getMandatoryBody(RemoveObjectsArgs.Builder.class); if (isNotEmpty(payload)) { minioClient.removeObjects(payload.build()); Message message = getMessageForResponse(exchange); message.setBody(true); } } else { throw new IllegalArgumentException("Cannot delete multiple objects without a POJO request"); } }
It looks like there is no test code for MinioOperations.deleteObjects in org.apache.camel.component.minio.integration.MinioDeleteBucketOperationIT test class.
- is related to
-
CSB-612 camel-minio support
-
- Closed
-
- links to