diff --git a/geode-spring-boot-starter/src/main/java/org/springframework/boot/data/geode/core/env/VcapPropertySource.java b/geode-spring-boot-starter/src/main/java/org/springframework/boot/data/geode/core/env/VcapPropertySource.java index 3b7b77f4..1466db95 100644 --- a/geode-spring-boot-starter/src/main/java/org/springframework/boot/data/geode/core/env/VcapPropertySource.java +++ b/geode-spring-boot-starter/src/main/java/org/springframework/boot/data/geode/core/env/VcapPropertySource.java @@ -98,8 +98,8 @@ public class VcapPropertySource extends PropertySource propertySources.get(VCAP_PROPERTY_SOURCE_NAME)) .map(VcapPropertySource::from) .orElseThrow(() -> newIllegalArgumentException( - "Environment [%1$s] was not configurable or does not contain an enumerable [%2$s] PropertySource", - environment, VCAP_PROPERTY_SOURCE_NAME)); + "Environment was not configurable or does not contain an enumerable [%s] PropertySource", + VCAP_PROPERTY_SOURCE_NAME)); } public static VcapPropertySource from(Properties properties) { diff --git a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/core/env/VcapPropertySourceUnitTests.java b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/core/env/VcapPropertySourceUnitTests.java index b6a162d4..1dd6e3af 100644 --- a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/core/env/VcapPropertySourceUnitTests.java +++ b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/core/env/VcapPropertySourceUnitTests.java @@ -89,9 +89,8 @@ public class VcapPropertySourceUnitTests { } catch (IllegalArgumentException expected) { - assertThat(expected).hasMessage( - "Environment [%s] was not configurable or does not contain an enumerable [vcap] PropertySource", - mockEnvironment); + assertThat(expected) + .hasMessage("Environment was not configurable or does not contain an enumerable [vcap] PropertySource"); assertThat(expected).hasNoCause(); @@ -117,9 +116,8 @@ public class VcapPropertySourceUnitTests { } catch (IllegalArgumentException expected) { - assertThat(expected).hasMessage( - "Environment [%s] was not configurable or does not contain an enumerable [vcap] PropertySource", - mockEnvironment); + assertThat(expected) + .hasMessage("Environment was not configurable or does not contain an enumerable [vcap] PropertySource"); assertThat(expected).hasNoCause();