From 43c270a53c5d16119b34ddc6ccebe5cf8e4fd7f1 Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Fri, 18 Jan 2019 10:29:14 -0500 Subject: [PATCH 1/2] Provide exact error when there is a problem opening the logging config file. Fixes #464 (#470) --- .../bootstrap/config/PropertySourceBootstrapConfiguration.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java index 94465b91..73eedf8d 100644 --- a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java +++ b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java @@ -134,8 +134,7 @@ public class PropertySourceBootstrapConfiguration implements } catch (Exception ex) { PropertySourceBootstrapConfiguration.logger - .warn("Logging config file location '" + logConfig - + "' cannot be opened and will be ignored"); + .warn("Error opening logging config file " + logConfig, ex); } } } From b91e2ab731b342ec71b4c2e016af840c1a4d417a Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Fri, 18 Jan 2019 16:12:52 -0500 Subject: [PATCH 2/2] Trim profile names in array (#469) * Trim profile names in array. Fixes #460 * Use tokenizeToStringArray --- .../bootstrap/config/PropertySourceBootstrapConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java index 376f3efa..88b7ce09 100644 --- a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java +++ b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java @@ -222,7 +222,7 @@ public class PropertySourceBootstrapConfiguration implements private String[] getProfilesForValue(Object property) { final String value = (property == null ? null : property.toString()); - return StringUtils.commaDelimitedListToStringArray(value); + return property == null ? new String[0] : StringUtils.tokenizeToStringArray(value, ","); } }