in spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java [380:395]
public ConditionMessage items(Style style, Collection<?> items) {
Assert.notNull(style, "Style must not be null");
StringBuilder message = new StringBuilder(this.reason);
items = style.applyTo(items);
if ((this.condition == null || items == null || items.size() <= 1)
&& StringUtils.hasLength(this.singular)) {
message.append(" ").append(this.singular);
}
else if (StringUtils.hasLength(this.plural)) {
message.append(" ").append(this.plural);
}
if (items != null && !items.isEmpty()) {
message.append(" ").append(StringUtils.collectionToDelimitedString(items, ", "));
}
return this.condition.because(message.toString());
}