From 50f5a50c33e0c5219c42c9a3b630c488237b6d2c Mon Sep 17 00:00:00 2001 From: gmunozfe Date: Wed, 13 Dec 2023 16:14:34 +0100 Subject: [PATCH] [JBPM-10214] Fix regression for immutable KIE container with auto scan --- .../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..5f790b68c3 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) {