Commit 60eace17 authored by Stephane Nicoll's avatar Stephane Nicoll

Merge pull request #14172 from izeye:polish-20180823

* pr/14172:
  Polish
parents 1b7f7134 9602a32a
...@@ -191,14 +191,11 @@ public class LocalDevToolsAutoConfiguration { ...@@ -191,14 +191,11 @@ public class LocalDevToolsAutoConfiguration {
@Override @Override
public void onApplicationEvent(ApplicationEvent event) { public void onApplicationEvent(ApplicationEvent event) {
if (event instanceof ContextRefreshedEvent) { if (event instanceof ContextRefreshedEvent
|| (event instanceof ClassPathChangedEvent
&& !((ClassPathChangedEvent) event).isRestartRequired())) {
this.liveReloadServer.triggerReload(); this.liveReloadServer.triggerReload();
} }
if (event instanceof ClassPathChangedEvent) {
if (!((ClassPathChangedEvent) event).isRestartRequired()) {
this.liveReloadServer.triggerReload();
}
}
} }
@Override @Override
......
...@@ -1290,7 +1290,7 @@ To specify a session timeout of 30 seconds, `30`, `PT30S` and `30s` are all equi ...@@ -1290,7 +1290,7 @@ To specify a session timeout of 30 seconds, `30`, `PT30S` and `30s` are all equi
read timeout of 500ms can be specified in any of the following form: `500`, `PT0.5S` and read timeout of 500ms can be specified in any of the following form: `500`, `PT0.5S` and
`500ms`. `500ms`.
You can also use any of the supported unit. These are: You can also use any of the supported units. These are:
* `ns` for nanoseconds * `ns` for nanoseconds
* `us` for microseconds * `us` for microseconds
...@@ -1331,7 +1331,7 @@ include::{code-examples}/context/properties/bind/AppIoProperties.java[tag=exampl ...@@ -1331,7 +1331,7 @@ include::{code-examples}/context/properties/bind/AppIoProperties.java[tag=exampl
To specify a buffer size of 10 megabytes, `10` and `10MB` are equivalent. A size threshold To specify a buffer size of 10 megabytes, `10` and `10MB` are equivalent. A size threshold
of 256 bytes can be specified as `256` or `256B`. of 256 bytes can be specified as `256` or `256B`.
You can also use any of the supported unit. These are: You can also use any of the supported units. These are:
* `B` for bytes * `B` for bytes
* `KB` for kilobytes * `KB` for kilobytes
......
...@@ -40,8 +40,7 @@ public class DataLdapTestPropertiesIntegrationTests { ...@@ -40,8 +40,7 @@ public class DataLdapTestPropertiesIntegrationTests {
@Test @Test
public void environmentWithNewProfile() { public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0]; assertThat(this.environment.getActiveProfiles()).containsExactly("test");
assertThat(profile).isEqualTo("test");
} }
} }
...@@ -40,8 +40,7 @@ public class DataMongoTestPropertiesIntegrationTests { ...@@ -40,8 +40,7 @@ public class DataMongoTestPropertiesIntegrationTests {
@Test @Test
public void environmentWithNewProfile() { public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0]; assertThat(this.environment.getActiveProfiles()).containsExactly("test");
assertThat(profile).isEqualTo("test");
} }
} }
...@@ -50,8 +50,7 @@ public class DataNeo4jTestPropertiesIntegrationTests { ...@@ -50,8 +50,7 @@ public class DataNeo4jTestPropertiesIntegrationTests {
@Test @Test
public void environmentWithNewProfile() { public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0]; assertThat(this.environment.getActiveProfiles()).containsExactly("test");
assertThat(profile).isEqualTo("test");
} }
static class Initializer static class Initializer
......
...@@ -50,8 +50,7 @@ public class DataRedisTestPropertiesIntegrationTests { ...@@ -50,8 +50,7 @@ public class DataRedisTestPropertiesIntegrationTests {
@Test @Test
public void environmentWithNewProfile() { public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0]; assertThat(this.environment.getActiveProfiles()).containsExactly("test");
assertThat(profile).isEqualTo("test");
} }
static class Initializer static class Initializer
......
...@@ -40,8 +40,7 @@ public class JdbcTestPropertiesIntegrationTests { ...@@ -40,8 +40,7 @@ public class JdbcTestPropertiesIntegrationTests {
@Test @Test
public void environmentWithNewProfile() { public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0]; assertThat(this.environment.getActiveProfiles()).containsExactly("test");
assertThat(profile).isEqualTo("test");
} }
} }
...@@ -40,8 +40,7 @@ public class JooqTestPropertiesIntegrationTests { ...@@ -40,8 +40,7 @@ public class JooqTestPropertiesIntegrationTests {
@Test @Test
public void environmentWithNewProfile() { public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0]; assertThat(this.environment.getActiveProfiles()).containsExactly("test");
assertThat(profile).isEqualTo("test");
} }
} }
...@@ -40,8 +40,7 @@ public class JsonTestPropertiesIntegrationTests { ...@@ -40,8 +40,7 @@ public class JsonTestPropertiesIntegrationTests {
@Test @Test
public void environmentWithNewProfile() { public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0]; assertThat(this.environment.getActiveProfiles()).containsExactly("test");
assertThat(profile).isEqualTo("test");
} }
} }
...@@ -40,8 +40,7 @@ public class DataJpaTestPropertiesIntegrationTests { ...@@ -40,8 +40,7 @@ public class DataJpaTestPropertiesIntegrationTests {
@Test @Test
public void environmentWithNewProfile() { public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0]; assertThat(this.environment.getActiveProfiles()).containsExactly("test");
assertThat(profile).isEqualTo("test");
} }
} }
...@@ -40,8 +40,7 @@ public class RestClientTestPropertiesIntegrationTests { ...@@ -40,8 +40,7 @@ public class RestClientTestPropertiesIntegrationTests {
@Test @Test
public void environmentWithNewProfile() { public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0]; assertThat(this.environment.getActiveProfiles()).containsExactly("test");
assertThat(profile).isEqualTo("test");
} }
} }
...@@ -40,8 +40,7 @@ public class WebFluxTestPropertiesIntegrationTests { ...@@ -40,8 +40,7 @@ public class WebFluxTestPropertiesIntegrationTests {
@Test @Test
public void environmentWithNewProfile() { public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0]; assertThat(this.environment.getActiveProfiles()).containsExactly("test");
assertThat(profile).isEqualTo("test");
} }
} }
...@@ -40,8 +40,7 @@ public class WebMvcTestPropertiesIntegrationTests { ...@@ -40,8 +40,7 @@ public class WebMvcTestPropertiesIntegrationTests {
@Test @Test
public void environmentWithNewProfile() { public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0]; assertThat(this.environment.getActiveProfiles()).containsExactly("test");
assertThat(profile).isEqualTo("test");
} }
} }
...@@ -86,9 +86,9 @@ class NoSuchMethodFailureAnalyzer extends AbstractFailureAnalyzer<NoSuchMethodEr ...@@ -86,9 +86,9 @@ class NoSuchMethodFailureAnalyzer extends AbstractFailureAnalyzer<NoSuchMethodEr
private List<URL> findCandidates(String className) { private List<URL> findCandidates(String className) {
try { try {
return Collections.list((NoSuchMethodFailureAnalyzer.class.getClassLoader() return Collections.list(NoSuchMethodFailureAnalyzer.class.getClassLoader()
.getResources(ClassUtils.convertClassNameToResourcePath(className) .getResources(ClassUtils.convertClassNameToResourcePath(className)
+ ".class"))); + ".class"));
} }
catch (Throwable ex) { catch (Throwable ex) {
return null; return null;
......
...@@ -27,7 +27,7 @@ import static org.mockito.BDDMockito.given; ...@@ -27,7 +27,7 @@ import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
/** /**
* Create a mock {@link TypeDescriptor} with optional {@link DataUnit} annotation. * Create a mock {@link TypeDescriptor} with optional {@link DataSizeUnit} annotation.
* *
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */
......
...@@ -30,7 +30,9 @@ import static org.assertj.core.api.Assertions.assertThat; ...@@ -30,7 +30,9 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
/** /**
* @author awilkinson * Tests for {@link NoSuchMethodFailureAnalyzer}.
*
* @author Andy Wilkinson
*/ */
@RunWith(ModifiedClassPathRunner.class) @RunWith(ModifiedClassPathRunner.class)
@ClassPathOverrides("javax.servlet:servlet-api:2.5") @ClassPathOverrides("javax.servlet:servlet-api:2.5")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment