squakez commented on code in PR #15063: URL: https://github.com/apache/camel/pull/15063#discussion_r1711161864
########## core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java: ########## @@ -433,6 +448,43 @@ private Properties tryLoadProperties( return ip; } + private static Properties tryLoadCloudProperties( + Properties overridProperties, String cloudPropertiesLocations) + throws IOException { + + final Properties cp = new Properties(); + try { + String[] locations = cloudPropertiesLocations.split(","); + for (String loc : locations) { + Path confPath = Paths.get(loc); + if (Files.exists(confPath) && Files.isDirectory(confPath)) { + Files.walkFileTree(confPath, new SimpleFileVisitor<Path>() { + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { + if (!Files.isDirectory(file)) { + try { + String val = new String(Files.readAllBytes(file)); + cp.put(file.getFileName().toString(), val); + } catch (IOException e) { + // Do nothing or should we throw a RuntimeException? Review Comment: I am not sure if we should throw an exception here. This may happen for instance if the user is setting a binary configuration. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org