Browse Source

Fix OnPropertyCondition no havingValue message

See gh-2193
pull/2400/head
Phillip Webb 11 years ago
parent
commit
82bf60400a
  1. 2
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnPropertyCondition.java

2
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnPropertyCondition.java

@ -87,7 +87,7 @@ class OnPropertyCondition extends SpringBootCondition { @@ -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));
}

Loading…
Cancel
Save