Fix OnPropertyCondition no havingValue message

See gh-2193
This commit is contained in:
Phillip Webb
2014-12-19 14:52:56 -08:00
parent 57442f5b12
commit 82bf60400a

View File

@@ -87,7 +87,7 @@ class OnPropertyCondition extends SpringBootCondition {
+ expandNames(prefix, missingProperties) + " ");
}
if (!nonMatchingProperties.isEmpty()) {
String expected = havingValue == null ? "!false" : havingValue;
String expected = StringUtils.hasLength(havingValue) ? havingValue : "!false";
message.append("expected '").append(expected).append("' for properties ")
.append(expandNames(prefix, nonMatchingProperties));
}