Merge branch '2.3.x'

Closes gh-21764
pull/21769/head
Phillip Webb 5 years ago
commit 16b1d64b43

@ -69,7 +69,8 @@ public class AvailabilityStateHealthIndicator extends AbstractHealthIndicator {
if (!this.statusMappings.containsKey(null) && Enum.class.isAssignableFrom(stateType)) {
EnumSet elements = EnumSet.allOf((Class) stateType);
for (Object element : elements) {
Assert.isTrue(this.statusMappings.containsKey(element), "StatusMappings does not include " + element);
Assert.isTrue(this.statusMappings.containsKey(element),
() -> "StatusMappings does not include " + element);
}
}
}
@ -81,7 +82,7 @@ public class AvailabilityStateHealthIndicator extends AbstractHealthIndicator {
if (status == null) {
status = this.statusMappings.get(null);
}
Assert.state(status != null, "No mapping provided for " + state);
Assert.state(status != null, () -> "No mapping provided for " + state);
builder.status(status);
}

Loading…
Cancel
Save