This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 417cb2e9e8 Close the class path resource properly after reading from
it in BeanioProcessor
417cb2e9e8 is described below
commit 417cb2e9e8c8cd4389aa6546f407a8708736ca9d
Author: Peter Palaga <[email protected]>
AuthorDate: Wed Oct 22 15:12:56 2025 +0200
Close the class path resource properly after reading from it in
BeanioProcessor
---
.../camel/quarkus/component/beanio/deployment/BeanioProcessor.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/extensions/beanio/deployment/src/main/java/org/apache/camel/quarkus/component/beanio/deployment/BeanioProcessor.java
b/extensions/beanio/deployment/src/main/java/org/apache/camel/quarkus/component/beanio/deployment/BeanioProcessor.java
index d1bd95b8b3..569c55ccd2 100644
---
a/extensions/beanio/deployment/src/main/java/org/apache/camel/quarkus/component/beanio/deployment/BeanioProcessor.java
+++
b/extensions/beanio/deployment/src/main/java/org/apache/camel/quarkus/component/beanio/deployment/BeanioProcessor.java
@@ -17,6 +17,7 @@
package org.apache.camel.quarkus.component.beanio.deployment;
import java.io.IOException;
+import java.io.InputStream;
import java.util.Properties;
import java.util.Set;
import java.util.stream.Collectors;
@@ -56,8 +57,10 @@ class BeanioProcessor {
BeanioPropertiesBuildItem beanioProperties() {
try {
Properties properties = new Properties();
- properties.load(Thread.currentThread().getContextClassLoader()
-
.getResourceAsStream("org/beanio/internal/config/beanio.properties"));
+ try (InputStream in =
Thread.currentThread().getContextClassLoader()
+
.getResourceAsStream("org/beanio/internal/config/beanio.properties")) {
+ properties.load(in);
+ }
return new BeanioPropertiesBuildItem(properties);
} catch (IOException e) {
throw new RuntimeException(e);