Skip to content

Commit 2b64954

Browse files
committed
Merge pull request #5532 from izeye/polish-20160330
* pr/5532: Polish
2 parents 8a11620 + a28dd9d commit 2b64954

File tree

34 files changed

+89
-89
lines changed

34 files changed

+89
-89
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/AutoConfigurationReportLoggingInitializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void logAutoConfigurationReport(boolean isCrashReport) {
103103
+ "debug logging (start with --debug)%n%n"));
104104
}
105105
if (this.logger.isDebugEnabled()) {
106-
this.logger.debug(new ConditionEvalutionReportMessage(this.report));
106+
this.logger.debug(new ConditionEvaluationReportMessage(this.report));
107107
}
108108
}
109109
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
* @author Phillip Webb
3636
* @since 1.4.0
3737
*/
38-
public class ConditionEvalutionReportMessage {
38+
public class ConditionEvaluationReportMessage {
3939

4040
private StringBuilder message;
4141

42-
public ConditionEvalutionReportMessage(ConditionEvaluationReport report) {
42+
public ConditionEvaluationReportMessage(ConditionEvaluationReport report) {
4343
this.message = getLogMessage(report);
4444
}
4545

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ private void testConfigImports(Class<?> config) {
4747
config);
4848
String shortName = ClassUtils.getShortName(ImportAutoConfigurationTests.class);
4949
int beginIndex = shortName.length() + 1;
50-
List<String> orderdConfigBeans = new ArrayList<String>();
50+
List<String> orderedConfigBeans = new ArrayList<String>();
5151
for (String bean : context.getBeanDefinitionNames()) {
5252
if (bean.contains("$Config")) {
5353
String shortBeanName = ClassUtils.getShortName(bean);
54-
orderdConfigBeans.add(shortBeanName.substring(beginIndex));
54+
orderedConfigBeans.add(shortBeanName.substring(beginIndex));
5555
}
5656
}
57-
assertThat(orderdConfigBeans).containsExactly("ConfigA", "ConfigB", "ConfigC",
57+
assertThat(orderedConfigBeans).containsExactly("ConfigA", "ConfigB", "ConfigC",
5858
"ConfigD");
5959
context.close();
6060
}

spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4306,7 +4306,7 @@ If you use the
43064306
the following provided libraries:
43074307

43084308
* http://junit.org[JUnit] -- The de-facto standard for unit testing Java applications.
4309-
* {spring-reference}/#integration-testing.html[Spring Test] & Spring Boot Test -- utilties and integration test support for Spring Boot
4309+
* {spring-reference}/#integration-testing.html[Spring Test] & Spring Boot Test -- utilities and integration test support for Spring Boot
43104310
applications.
43114311
* http://joel-costigliola.github.io/assertj/[AssertJ] - A fluent assertion library.
43124312
* http://hamcrest.org/JavaHamcrest/[Hamcrest] -- A library of matcher objects (also known
@@ -4599,7 +4599,7 @@ a little too much for tests. It's often helpful to load only the parts of the
45994599
configuration that are required to test a '`slice`' of your application. For example, you
46004600
might want to test that Spring MVC controllers are mapping URLs correctly, and you don't
46014601
want to involve and database calls in those tests; or you _might be wanting_ to test JPA
4602-
entites, and you're not interested in web layer when those tests run.
4602+
entities, and you're not interested in web layer when those tests run.
46034603

46044604
The `spring-boot-test-autoconfigure` module includes a number of annotations that can be
46054605
used to automatically configure such '`slices`'. Each of them work in a similar way,
@@ -4615,7 +4615,7 @@ TIP: It's also possible to use the `@AutoConfigure...` annotations with the stan
46154615

46164616
[[boot-features-testing-spring-boot-applications-testing-autoconfigured-json-tests]]
46174617
==== Auto-configured JSON tests
4618-
To test that Object JSON serilization and deserialization is working as expected you can
4618+
To test that Object JSON serialization and deserialization is working as expected you can
46194619
use the `@JsonTest` annotation. `@JsonTest` will auto-configure Jackson ObjectMappers,
46204620
any `@JsonComponent` beans and any Jackson `Modules`. It also configures `Gson`
46214621
if you happen to be using that instead of, or as well as, Jackson. If you need to

spring-boot-samples/spring-boot-sample-test/src/test/java/sample/test/web/UserVehicleControllerApplicationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void getVehicleWhenRequestingTextShouldReturnMakeAndModel() throws Except
6666
}
6767

6868
@Test
69-
public void welcomeCommandLineRunnerShouldBeAvailble() throws Exception {
69+
public void welcomeCommandLineRunnerShouldBeAvailable() throws Exception {
7070
// Since we're a @SpringApplicationTest all beans should be available
7171
assertThat(this.applicationContext.getBean(WelcomeCommandLineRunner.class))
7272
.isNotNull();

spring-boot-samples/spring-boot-sample-test/src/test/java/sample/test/web/UserVehicleControllerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public void getVehicleWhenVinNotFoundShouldReturnNotFound() throws Exception {
101101
}
102102

103103
@Test(expected = NoSuchBeanDefinitionException.class)
104-
public void welcomeCommandLineRunnerShouldBeAvailble() throws Exception {
104+
public void welcomeCommandLineRunnerShouldBeAvailable() throws Exception {
105105
// Since we're a @WebMvcTest WelcomeCommandLineRunner should not be available
106106
assertThat(this.applicationContext.getBean(WelcomeCommandLineRunner.class));
107107
}

spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/AutoConfigureReportTestExecutionListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package org.springframework.boot.test.autoconfigure;
1818

1919
import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport;
20-
import org.springframework.boot.autoconfigure.logging.ConditionEvalutionReportMessage;
20+
import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportMessage;
2121
import org.springframework.context.ApplicationContext;
2222
import org.springframework.context.ConfigurableApplicationContext;
2323
import org.springframework.test.context.TestContext;
@@ -50,7 +50,7 @@ public void prepareTestInstance(TestContext testContext) throws Exception {
5050
if (context instanceof ConfigurableApplicationContext) {
5151
ConditionEvaluationReport report = ConditionEvaluationReport
5252
.get(((ConfigurableApplicationContext) context).getBeanFactory());
53-
System.err.println(new ConditionEvalutionReportMessage(report));
53+
System.err.println(new ConditionEvaluationReportMessage(report));
5454
}
5555
throw ex;
5656
}

spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/OverrideAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* Annotation that can be used to override
3030
* {@link EnableAutoConfiguration @EnableAutoConfiguration}. Often used in combination
31-
* with {@link ImportAutoConfiguration} to limit the auto-configutation classes that are
31+
* with {@link ImportAutoConfiguration} to limit the auto-configuration classes that are
3232
* loaded.
3333
*
3434
* @author Phillip Webb

spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/filter/AnnotationCustomizableTypeExcludeFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ && defaultInclude(metadataReader, metadataReaderFactory)) {
7070

7171
protected boolean defaultInclude(MetadataReader metadataReader,
7272
MetadataReaderFactory metadataReaderFactory) throws IOException {
73-
for (Class<?> include : getDefaultIncudes()) {
73+
for (Class<?> include : getDefaultIncludes()) {
7474
if (isTypeOrAnnotated(metadataReader, metadataReaderFactory, include)) {
7575
return true;
7676
}
@@ -101,7 +101,7 @@ protected final boolean isTypeOrAnnotated(MetadataReader metadataReader,
101101

102102
protected abstract boolean isUseDefaultFilters();
103103

104-
protected abstract Set<Class<?>> getDefaultIncudes();
104+
protected abstract Set<Class<?>> getDefaultIncludes();
105105

106106
protected static enum FilterType {
107107
INCLUDE, EXCLUDE

spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/filter/FilterAnnotations.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ private TypeFilter createTypeFilter(FilterType filterType, Class<?> filterClass)
7272
switch (filterType) {
7373
case ANNOTATION:
7474
Assert.isAssignable(Annotation.class, filterClass,
75-
"An error occured while processing a ANNOTATION type filter: ");
75+
"An error occurred while processing a ANNOTATION type filter: ");
7676
return new AnnotationTypeFilter((Class<Annotation>) filterClass);
7777
case ASSIGNABLE_TYPE:
7878
return new AssignableTypeFilter(filterClass);
7979
case CUSTOM:
8080
Assert.isAssignable(TypeFilter.class, filterClass,
81-
"An error occured while processing a CUSTOM type filter: ");
81+
"An error occurred while processing a CUSTOM type filter: ");
8282
return BeanUtils.instantiateClass(filterClass, TypeFilter.class);
8383
}
8484
throw new IllegalArgumentException(

spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/json/JsonExcludeFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected boolean isUseDefaultFilters() {
7373
}
7474

7575
@Override
76-
protected Set<Class<?>> getDefaultIncudes() {
76+
protected Set<Class<?>> getDefaultIncludes() {
7777
return DEFAULT_INCLUDES;
7878
}
7979

spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/json/JsonTesterInitializationTestExecutionListener.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ public class JsonTesterInitializationTestExecutionListener
4949

5050
private static final String ASSERTJ_CLASS = "org.assertj.core.api.Assert";
5151

52-
private static final Map<String, Class<?>> INITALIZERS;
52+
private static final Map<String, Class<?>> INITIALIZERS;
5353

5454
static {
5555
Map<String, Class<?>> initializers = new LinkedHashMap<String, Class<?>>();
5656
initializers.put("com.fasterxml.jackson.databind.ObjectMapper",
5757
JacksonInitializer.class);
5858
initializers.put("com.google.gson.Gson", GsonInitializer.class);
59-
INITALIZERS = Collections.unmodifiableMap(initializers);
59+
INITIALIZERS = Collections.unmodifiableMap(initializers);
6060
}
6161

6262
@Override
@@ -101,7 +101,7 @@ private void setupField(Field field) {
101101

102102
private void initializeJsonMarshalTesterFields(ClassLoader classLoader,
103103
TestContext testContext) {
104-
for (Map.Entry<String, Class<?>> entry : INITALIZERS.entrySet()) {
104+
for (Map.Entry<String, Class<?>> entry : INITIALIZERS.entrySet()) {
105105
if (ClassUtils.isPresent(entry.getKey(), classLoader)) {
106106
initializeJsonMarshalTesterFields(classLoader, testContext,
107107
entry.getKey(), entry.getValue());

spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/orm/jpa/DataJpaTypeExcludeFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected boolean defaultInclude(MetadataReader metadataReader,
6969
}
7070

7171
@Override
72-
protected Set<Class<?>> getDefaultIncudes() {
72+
protected Set<Class<?>> getDefaultIncludes() {
7373
return Collections.emptySet();
7474
}
7575

spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/orm/jpa/TestEntityManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public <E> E persist(E entity) {
103103
* {@link #getId(Object) entity ID}.
104104
* <p>
105105
* Helpful when ensuring that entity data is actually written and read from the
106-
* underling database correctly.
106+
* underlying database correctly.
107107
* @param <E> the entity type
108108
* @param entity the entity to persist
109109
* @return the entity found using the ID of the persisted entity
@@ -226,7 +226,7 @@ public Object getId(Object entity) {
226226
@SuppressWarnings("unchecked")
227227
public <T> T getId(Object entity, Class<T> idType) {
228228
Object id = getId(entity);
229-
Assert.isInstanceOf(idType, id, "ID missmatch");
229+
Assert.isInstanceOf(idType, id, "ID mismatch");
230230
return (T) id;
231231
}
232232

@@ -238,7 +238,7 @@ public <T> T getId(Object entity, Class<T> idType) {
238238
public final EntityManager getEntityManager() {
239239
EntityManager manager = EntityManagerFactoryUtils
240240
.getTransactionalEntityManager(this.entityManagerFactory);
241-
Assert.state(manager != null, "No transactional EnitiyManager found");
241+
Assert.state(manager != null, "No transactional EntityManager found");
242242
return manager;
243243
}
244244

spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
* By default, tests annotated with {@code @WebMvcTest} will also auto-configure
4949
* {@link MockMvc} (include support for HtmlUnit WebDriver and Selenium WebClient). For
5050
* more fine-grained control of MockMVC that
51-
* {@link AutoConfigureMockMvc @AutoConfigureMockMvc} annotation cab be used.
51+
* {@link AutoConfigureMockMvc @AutoConfigureMockMvc} annotation can be used.
5252
* <p>
5353
* Typically {@code @WebMvcTest} is used in combination with {@link MockBean @MockBean} or
5454
* {@link Import @Import} to create any collaborators required by your {@code @Controller}

spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTypeExcludeFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected boolean isUseDefaultFilters() {
108108
}
109109

110110
@Override
111-
protected Set<Class<?>> getDefaultIncudes() {
111+
protected Set<Class<?>> getDefaultIncludes() {
112112
if (ObjectUtils.isEmpty(this.annotation.controllers())) {
113113
return DEFAULT_INCLUDES_AND_CONTROLLER;
114114
}

spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/AutoConfigureReportTestExecutionListenerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void orderShouldBeBeforeDependencyInjectionTestExecutionListener()
5555
}
5656

5757
@Test
58-
public void prepareFialingTestInstanceShouldPrintReport() throws Exception {
58+
public void prepareFailingTestInstanceShouldPrintReport() throws Exception {
5959
TestContext testContext = mock(TestContext.class);
6060
given(testContext.getTestInstance()).willThrow(new IllegalStateException());
6161
SpringApplication application = new SpringApplication(Config.class);

spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/OverrideAutoConfigurationEnabledTrueIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class OverrideAutoConfigurationEnabledTrueIntegrationTest {
4545
private ApplicationContext context;
4646

4747
@Test
48-
public void autoconfiguredContext() throws Exception {
48+
public void autoConfiguredContext() throws Exception {
4949
ApplicationContext context = this.context;
5050
assertThat(context.getBean(ExampleSpringBootApplication.class)).isNotNull();
5151
assertThat(context.getBean(ConfigurationPropertiesBindingPostProcessor.class))

spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/json/ExampleJsonComponent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ protected void serializeObject(ExampleCustomObject value, JsonGenerator jgen,
4747

4848
}
4949

50-
public static class Deserialzer extends JsonObjectDeserializer<ExampleCustomObject> {
50+
public static class Deserializer extends JsonObjectDeserializer<ExampleCustomObject> {
5151

5252
@Override
53-
protected ExampleCustomObject deserializeObject(JsonParser jasonParser,
53+
protected ExampleCustomObject deserializeObject(JsonParser jsonParser,
5454
DeserializationContext context, ObjectCodec codec, JsonNode tree)
5555
throws IOException {
5656
return new ExampleCustomObject(

spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/TestEntityManagerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public void getIdForTypeShouldGetId() throws Exception {
202202
public void getIdForTypeWhenTypeIsWrongShouldThrowException() throws Exception {
203203
TestEntity entity = new TestEntity();
204204
given(this.persistenceUnitUtil.getIdentifier(entity)).willReturn(123);
205-
this.thrown.expectMessage("ID missmatch Object of class [java.lang.Integer] "
205+
this.thrown.expectMessage("ID mismatch Object of class [java.lang.Integer] "
206206
+ "must be an instance of class java.lang.Long");
207207
this.testEntityManager.getId(entity, Long.class);
208208
}
@@ -225,7 +225,7 @@ public void getEntityManagerShouldGetEntityManager() throws Exception {
225225
@Test
226226
public void getEntityManagerWhenNotSetShouldThrowException() throws Exception {
227227
this.thrown.expect(IllegalStateException.class);
228-
this.thrown.expectMessage("No transactional EnitiyManager found");
228+
this.thrown.expectMessage("No transactional EntityManager found");
229229
this.testEntityManager.getEntityManager();
230230
}
231231

spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/properties/AnnotationsPropertySourceTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public void propertiesWhenNotMappedAtAttributeLevelShouldIgnoreAttributes()
104104
}
105105

106106
@Test
107-
public void propertiesWhenCountainsArryasShouldExpandNames() throws Exception {
107+
public void propertiesWhenContainsArraysShouldExpandNames() throws Exception {
108108
AnnotationsPropertySource source = new AnnotationsPropertySource(Arrays.class);
109109
assertThat(source.getPropertyNames()).contains("strings[0]", "strings[1]",
110110
"classes[0]", "classes[1]", "ints[0]", "ints[1]", "longs[0]", "longs[1]",

spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/properties/ExampleMapping.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import java.lang.annotation.RetentionPolicy;
2121

2222
/**
23-
* Example {@link PropertyMapping} annotation for use wuth {@link PropertyMappingTests}.
23+
* Example {@link PropertyMapping} annotation for use with {@link PropertyMappingTests}.
2424
*
2525
* @author Phillip Webb
2626
*/

spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/properties/PropertyMappingContextCustomizerFactoryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void getContextCustomizerWhenHasAttributeMappingShouldReturnCustomizer()
7878
}
7979

8080
@Test
81-
public void hashCodeAndEqualsShoudBeBasedOnPropertyValues() throws Exception {
81+
public void hashCodeAndEqualsShouldBeBasedOnPropertyValues() throws Exception {
8282
ContextCustomizer customizer1 = this.factory
8383
.createContextCustomizer(TypeMapping.class, null);
8484
ContextCustomizer customizer2 = this.factory

spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/properties/PropertyMappingTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import static org.assertj.core.api.Assertions.assertThat;
2727

2828
/**
29-
* Integration tests for {@link PropertyMapping @PropertyMapping} annotaions.
29+
* Integration tests for {@link PropertyMapping @PropertyMapping} annotations.
3030
*
3131
* @author Phillip Webb
3232
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private List<String> getAndProcessPropertySourceProperties(
118118
* differentiate regular tests and bootstrapped tests. Without this property a cached
119119
* context could be returned that wasn't created by this bootstrapper. By default uses
120120
* the bootstrapper class as a property.
121-
* @return the differentator or {@code null}
121+
* @return the differentiator or {@code null}
122122
*/
123123
protected String getDifferentiatorPropertySourceProperty() {
124124
return getClass().getName() + "=true";

spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
* When {@code @MockBean} also defines a {@code name} this attribute can only contain
104104
* a single value.
105105
* <p>
106-
* If this is the only attribute specified consider using the {@code value} alais
106+
* If this is the only attribute specified consider using the {@code value} alias
107107
* instead.
108108
*/
109109
@AliasFor("value")

0 commit comments

Comments
 (0)