Commit 82bf6040 authored by Phillip Webb's avatar Phillip Webb

Fix OnPropertyCondition no havingValue message

See gh-2193
parent 57442f5b
...@@ -87,7 +87,7 @@ class OnPropertyCondition extends SpringBootCondition { ...@@ -87,7 +87,7 @@ class OnPropertyCondition extends SpringBootCondition {
+ expandNames(prefix, missingProperties) + " "); + expandNames(prefix, missingProperties) + " ");
} }
if (!nonMatchingProperties.isEmpty()) { if (!nonMatchingProperties.isEmpty()) {
String expected = havingValue == null ? "!false" : havingValue; String expected = StringUtils.hasLength(havingValue) ? havingValue : "!false";
message.append("expected '").append(expected).append("' for properties ") message.append("expected '").append(expected).append("' for properties ")
.append(expandNames(prefix, nonMatchingProperties)); .append(expandNames(prefix, nonMatchingProperties));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment