Browse Source

Merge pull request #6872 from izeye:polish-20160913

* pr/6872:
  Polish
pull/6872/merge
Stephane Nicoll 10 years ago
parent
commit
c65f099b9a
  1. 6
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java
  2. 4
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnResourceCondition.java
  3. 2
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration.java
  4. 2
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/DispatcherServletAutoConfiguration.java
  5. 2
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration.java
  6. 2
      spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootTest.java
  7. 2
      spring-boot-test/src/main/java/org/springframework/boot/test/web/client/LocalHostUriTemplateHandler.java
  8. 2
      spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/BuildInfoMojo.java

6
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java

@ -314,7 +314,7 @@ public final class ConditionMessage { @@ -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 { @@ -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 { @@ -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)) {

4
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnResourceCondition.java

@ -52,8 +52,8 @@ class OnResourceCondition extends SpringBootCondition { @@ -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);
}
}

2
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration.java

@ -224,7 +224,7 @@ public class DataSourceAutoConfiguration { @@ -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

2
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/DispatcherServletAutoConfiguration.java

@ -174,7 +174,7 @@ public class DispatcherServletAutoConfiguration { @@ -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));
}

2
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration.java

@ -168,7 +168,7 @@ public class ErrorMvcAutoConfiguration { @@ -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",

2
spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootTest.java

@ -55,7 +55,7 @@ import org.springframework.web.context.WebApplicationContext; @@ -55,7 +55,7 @@ import org.springframework.web.context.WebApplicationContext;
* {@link WebEnvironment#DEFINED_PORT defined} or {@link WebEnvironment#RANDOM_PORT
* random} port.</li>
* <li>Registers a {@link org.springframework.boot.test.web.client.TestRestTemplate
* TestRestTemplate} bean for use in web tests that are using a fully running container
* TestRestTemplate} bean for use in web tests that are using a fully running container.
* </li>
* </ul>
*

2
spring-boot-test/src/main/java/org/springframework/boot/test/web/client/LocalHostUriTemplateHandler.java

@ -46,7 +46,7 @@ public class LocalHostUriTemplateHandler extends RootUriTemplateHandler { @@ -46,7 +46,7 @@ public class LocalHostUriTemplateHandler extends RootUriTemplateHandler {
}
/**
* Create a new {@code LocalHostUriTemplateHandler} the will generate URIs with the
* Create a new {@code LocalHostUriTemplateHandler} that will generate URIs with the
* given {@code scheme} and use the given {@code environment} to determine the port.
* @param environment the environment used to determine the port
* @param scheme the scheme of the root uri

2
spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/BuildInfoMojo.java

@ -70,7 +70,7 @@ public class BuildInfoMojo extends AbstractMojo { @@ -70,7 +70,7 @@ public class BuildInfoMojo extends AbstractMojo {
}
catch (NullAdditionalPropertyValueException ex) {
throw new MojoFailureException(
"Failed to generated build-info.properties. " + ex.getMessage(), ex);
"Failed to generate build-info.properties. " + ex.getMessage(), ex);
}
catch (Exception ex) {
throw new MojoExecutionException(ex.getMessage(), ex);

Loading…
Cancel
Save