Skip to content

Commit 60eace1

Browse files
committed
Merge pull request #14172 from izeye:polish-20180823
* pr/14172: Polish
2 parents 1b7f713 + 9602a32 commit 60eace1

File tree

16 files changed

+22
-34
lines changed

16 files changed

+22
-34
lines changed

spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfiguration.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,11 @@ public boolean supportsSourceType(@Nullable Class<?> sourceType) {
191191

192192
@Override
193193
public void onApplicationEvent(ApplicationEvent event) {
194-
if (event instanceof ContextRefreshedEvent) {
194+
if (event instanceof ContextRefreshedEvent
195+
|| (event instanceof ClassPathChangedEvent
196+
&& !((ClassPathChangedEvent) event).isRestartRequired())) {
195197
this.liveReloadServer.triggerReload();
196198
}
197-
if (event instanceof ClassPathChangedEvent) {
198-
if (!((ClassPathChangedEvent) event).isRestartRequired()) {
199-
this.liveReloadServer.triggerReload();
200-
}
201-
}
202199
}
203200

204201
@Override

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ To specify a session timeout of 30 seconds, `30`, `PT30S` and `30s` are all equi
12901290
read timeout of 500ms can be specified in any of the following form: `500`, `PT0.5S` and
12911291
`500ms`.
12921292

1293-
You can also use any of the supported unit. These are:
1293+
You can also use any of the supported units. These are:
12941294

12951295
* `ns` for nanoseconds
12961296
* `us` for microseconds
@@ -1331,7 +1331,7 @@ include::{code-examples}/context/properties/bind/AppIoProperties.java[tag=exampl
13311331
To specify a buffer size of 10 megabytes, `10` and `10MB` are equivalent. A size threshold
13321332
of 256 bytes can be specified as `256` or `256B`.
13331333

1334-
You can also use any of the supported unit. These are:
1334+
You can also use any of the supported units. These are:
13351335

13361336
* `B` for bytes
13371337
* `KB` for kilobytes

spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/ldap/DataLdapTestPropertiesIntegrationTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ public class DataLdapTestPropertiesIntegrationTests {
4040

4141
@Test
4242
public void environmentWithNewProfile() {
43-
String profile = this.environment.getActiveProfiles()[0];
44-
assertThat(profile).isEqualTo("test");
43+
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
4544
}
4645

4746
}

spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestPropertiesIntegrationTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ public class DataMongoTestPropertiesIntegrationTests {
4040

4141
@Test
4242
public void environmentWithNewProfile() {
43-
String profile = this.environment.getActiveProfiles()[0];
44-
assertThat(profile).isEqualTo("test");
43+
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
4544
}
4645

4746
}

spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTestPropertiesIntegrationTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ public class DataNeo4jTestPropertiesIntegrationTests {
5050

5151
@Test
5252
public void environmentWithNewProfile() {
53-
String profile = this.environment.getActiveProfiles()[0];
54-
assertThat(profile).isEqualTo("test");
53+
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
5554
}
5655

5756
static class Initializer

spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/redis/DataRedisTestPropertiesIntegrationTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ public class DataRedisTestPropertiesIntegrationTests {
5050

5151
@Test
5252
public void environmentWithNewProfile() {
53-
String profile = this.environment.getActiveProfiles()[0];
54-
assertThat(profile).isEqualTo("test");
53+
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
5554
}
5655

5756
static class Initializer

spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTestPropertiesIntegrationTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ public class JdbcTestPropertiesIntegrationTests {
4040

4141
@Test
4242
public void environmentWithNewProfile() {
43-
String profile = this.environment.getActiveProfiles()[0];
44-
assertThat(profile).isEqualTo("test");
43+
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
4544
}
4645

4746
}

spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jooq/JooqTestPropertiesIntegrationTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ public class JooqTestPropertiesIntegrationTests {
4040

4141
@Test
4242
public void environmentWithNewProfile() {
43-
String profile = this.environment.getActiveProfiles()[0];
44-
assertThat(profile).isEqualTo("test");
43+
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
4544
}
4645

4746
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ public class JsonTestPropertiesIntegrationTests {
4040

4141
@Test
4242
public void environmentWithNewProfile() {
43-
String profile = this.environment.getActiveProfiles()[0];
44-
assertThat(profile).isEqualTo("test");
43+
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
4544
}
4645

4746
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ public class DataJpaTestPropertiesIntegrationTests {
4040

4141
@Test
4242
public void environmentWithNewProfile() {
43-
String profile = this.environment.getActiveProfiles()[0];
44-
assertThat(profile).isEqualTo("test");
43+
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
4544
}
4645

4746
}

0 commit comments

Comments
 (0)