Polish
Closes gh-6872
This commit is contained in:
committed by
Stephane Nicoll
parent
3684c2ec56
commit
caa4c0800f
@@ -314,7 +314,7 @@ public final class ConditionMessage {
|
||||
|
||||
private final Builder condition;
|
||||
|
||||
private final String reson;
|
||||
private final String reason;
|
||||
|
||||
private final String singular;
|
||||
|
||||
@@ -323,7 +323,7 @@ public final class ConditionMessage {
|
||||
private ItemsBuilder(Builder condition, String reason, String singular,
|
||||
String plural) {
|
||||
this.condition = condition;
|
||||
this.reson = reason;
|
||||
this.reason = reason;
|
||||
this.singular = singular;
|
||||
this.plural = plural;
|
||||
}
|
||||
@@ -383,7 +383,7 @@ public final class ConditionMessage {
|
||||
*/
|
||||
public ConditionMessage items(Style style, Collection<?> items) {
|
||||
Assert.notNull(style, "Style must not be null");
|
||||
StringBuilder message = new StringBuilder(this.reson);
|
||||
StringBuilder message = new StringBuilder(this.reason);
|
||||
items = style.applyTo(items);
|
||||
if ((this.condition == null || items.size() <= 1)
|
||||
&& StringUtils.hasLength(this.singular)) {
|
||||
|
||||
@@ -52,8 +52,8 @@ class OnResourceCondition extends SpringBootCondition {
|
||||
+ "least one resource location");
|
||||
List<String> missing = new ArrayList<String>();
|
||||
for (String location : locations) {
|
||||
String resouce = context.getEnvironment().resolvePlaceholders(location);
|
||||
if (!loader.getResource(resouce).exists()) {
|
||||
String resource = context.getEnvironment().resolvePlaceholders(location);
|
||||
if (!loader.getResource(resource).exists()) {
|
||||
missing.add(location);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ public class DataSourceAutoConfiguration {
|
||||
public ConditionOutcome getMatchOutcome(ConditionContext context,
|
||||
AnnotatedTypeMetadata metadata) {
|
||||
ConditionMessage.Builder message = ConditionMessage
|
||||
.forCondition("EmbeddedDataAvailble");
|
||||
.forCondition("EmbeddedDataAvailable");
|
||||
if (hasBean(context, DataSource.class)
|
||||
|| hasBean(context, XADataSource.class)) {
|
||||
return ConditionOutcome
|
||||
|
||||
@@ -174,7 +174,7 @@ public class DispatcherServletAutoConfiguration {
|
||||
.match(message.didNotFind("dispatcher servlet beans").atAll());
|
||||
}
|
||||
return ConditionOutcome.match(message
|
||||
.found("dipatcher servlet bean", "dispatcher servlet beans")
|
||||
.found("dispatcher servlet bean", "dispatcher servlet beans")
|
||||
.items(Style.QUOTE, dispatchServletBeans)
|
||||
.append("and none is named " + DEFAULT_DISPATCHER_SERVLET_BEAN_NAME));
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ public class ErrorMvcAutoConfiguration {
|
||||
public ConditionOutcome getMatchOutcome(ConditionContext context,
|
||||
AnnotatedTypeMetadata metadata) {
|
||||
ConditionMessage.Builder message = ConditionMessage
|
||||
.forCondition("ErrorTemplate Misssing");
|
||||
.forCondition("ErrorTemplate Missing");
|
||||
TemplateAvailabilityProviders providers = new TemplateAvailabilityProviders(
|
||||
context.getClassLoader());
|
||||
TemplateAvailabilityProvider provider = providers.getProvider("error",
|
||||
|
||||
Reference in New Issue
Block a user