From df89f9a7deb2ff7703ed891e4509273853fb7b3a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:17:25 +0100 Subject: [PATCH] [JBPM-10214] Fix regression for immutable KIE container with auto scan (#3004) (#3012) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [JBPM-10214] Fix regression for immutable KIE container with auto scan * Update kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java --------- Co-authored-by: Gonzalo Muñoz Co-authored-by: gmunozfe Co-authored-by: Francisco Javier Tirado Sarti <65240126+fjtirado@users.noreply.github.com> --- .../autoconfiguration/KieServerAutoConfiguration.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java b/kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java index 4639b71fd3..2eb1b5f91e 100644 --- a/kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java +++ b/kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java @@ -173,7 +173,8 @@ public List buildDeployments(KieServerProperties kieServer public List buildAutoScanDeployments(KieServerProperties kieServerProperties) throws IOException { ApplicationHome appHome = new ApplicationHome(); final String folder = "BOOT-INF/classes/KIE-INF/lib/"; - return (explodedJarFolder == null) ? discoverDeployments(folder, new FileInputStream(appHome.getSource())) : discoverDeployments(folder, new File(explodedJarFolder)); + List containerResources = discoverDeployments(folder, new File(explodedJarFolder)); + return containerResources.isEmpty() ? discoverDeployments(folder, new FileInputStream(appHome.getSource())) : containerResources; } public List discoverDeployments(String folder, File root) {