From 9f1c7964b8ab23ad19f0a4dade27e25ff9e122ff Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Thu, 20 Jun 2024 13:37:40 +0200 Subject: [PATCH] Ref #33288: fix config check logic --- .../openanalytics/containerproxy/ContainerProxyApplication.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/openanalytics/containerproxy/ContainerProxyApplication.java b/src/main/java/eu/openanalytics/containerproxy/ContainerProxyApplication.java index d2602d25..9813560b 100644 --- a/src/main/java/eu/openanalytics/containerproxy/ContainerProxyApplication.java +++ b/src/main/java/eu/openanalytics/containerproxy/ContainerProxyApplication.java @@ -120,7 +120,7 @@ public static void main(String[] args) { boolean hasExternalConfig = Files.exists(Paths.get(CONFIG_FILENAME)) || System.getProperty("spring.config.location") != null || System.getenv("SPRING_CONFIG_LOCATION") != null - || Arrays.asList(args).contains("--spring.config.location"); + || Arrays.stream(args).anyMatch(s -> s.contains("--spring.config.location")); if (!hasExternalConfig) { app.setAdditionalProfiles(CONFIG_DEMO_PROFILE);