This is an automated email from the ASF dual-hosted git repository.

pcongiusti 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 536e8eb74e84 Fix OpenScanHub 4.14.1 findings
536e8eb74e84 is described below

commit 536e8eb74e84cb065c53f9d91cf7d436c5944674
Author: Roman Stepaniuk <[email protected]>
AuthorDate: Thu Nov 6 14:07:54 2025 +0100

    Fix OpenScanHub 4.14.1 findings
---
 .../src/main/java/org/apache/camel/main/BaseMainSupport.java          | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java 
b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
index 11a88fd8d015..140a3d48ee29 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
@@ -493,9 +493,9 @@ public abstract class BaseMainSupport extends BaseService {
                         public FileVisitResult visitFile(Path file, 
BasicFileAttributes attrs) {
                             if (!Files.isDirectory(file)) {
                                 if 
(file.getFileName().toString().endsWith(".properties")) {
-                                    try {
+                                    try (InputStream is = 
Files.newInputStream(file)) {
                                         Properties prop = new Properties();
-                                        prop.load(Files.newInputStream(file));
+                                        prop.load(is);
                                         cp.putAll(loc, prop);
                                     } catch (IOException e) {
                                         LOG.warn(

Reply via email to