Browse Source

Merge pull request #14172 from izeye:polish-20180823

* pr/14172:
  Polish
pull/14176/head
Stephane Nicoll 8 years ago
parent
commit
60eace17d4
  1. 9
      spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfiguration.java
  2. 4
      spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
  3. 3
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/ldap/DataLdapTestPropertiesIntegrationTests.java
  4. 3
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestPropertiesIntegrationTests.java
  5. 3
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTestPropertiesIntegrationTests.java
  6. 3
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/redis/DataRedisTestPropertiesIntegrationTests.java
  7. 3
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTestPropertiesIntegrationTests.java
  8. 3
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jooq/JooqTestPropertiesIntegrationTests.java
  9. 3
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/json/JsonTestPropertiesIntegrationTests.java
  10. 3
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/DataJpaTestPropertiesIntegrationTests.java
  11. 3
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/RestClientTestPropertiesIntegrationTests.java
  12. 3
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/WebFluxTestPropertiesIntegrationTests.java
  13. 3
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTestPropertiesIntegrationTests.java
  14. 4
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzer.java
  15. 2
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/MockDataSizeTypeDescriptor.java
  16. 4
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzerTests.java

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

@ -191,14 +191,11 @@ public class LocalDevToolsAutoConfiguration { @@ -191,14 +191,11 @@ public class LocalDevToolsAutoConfiguration {
@Override
public void onApplicationEvent(ApplicationEvent event) {
if (event instanceof ContextRefreshedEvent) {
if (event instanceof ContextRefreshedEvent
|| (event instanceof ClassPathChangedEvent
&& !((ClassPathChangedEvent) event).isRestartRequired())) {
this.liveReloadServer.triggerReload();
}
if (event instanceof ClassPathChangedEvent) {
if (!((ClassPathChangedEvent) event).isRestartRequired()) {
this.liveReloadServer.triggerReload();
}
}
}
@Override

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

@ -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
`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
* `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
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
* `KB` for kilobytes

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

@ -40,8 +40,7 @@ public class DataLdapTestPropertiesIntegrationTests { @@ -40,8 +40,7 @@ public class DataLdapTestPropertiesIntegrationTests {
@Test
public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0];
assertThat(profile).isEqualTo("test");
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
}
}

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

@ -40,8 +40,7 @@ public class DataMongoTestPropertiesIntegrationTests { @@ -40,8 +40,7 @@ public class DataMongoTestPropertiesIntegrationTests {
@Test
public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0];
assertThat(profile).isEqualTo("test");
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
}
}

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

@ -50,8 +50,7 @@ public class DataNeo4jTestPropertiesIntegrationTests { @@ -50,8 +50,7 @@ public class DataNeo4jTestPropertiesIntegrationTests {
@Test
public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0];
assertThat(profile).isEqualTo("test");
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
}
static class Initializer

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

@ -50,8 +50,7 @@ public class DataRedisTestPropertiesIntegrationTests { @@ -50,8 +50,7 @@ public class DataRedisTestPropertiesIntegrationTests {
@Test
public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0];
assertThat(profile).isEqualTo("test");
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
}
static class Initializer

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

@ -40,8 +40,7 @@ public class JdbcTestPropertiesIntegrationTests { @@ -40,8 +40,7 @@ public class JdbcTestPropertiesIntegrationTests {
@Test
public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0];
assertThat(profile).isEqualTo("test");
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
}
}

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

@ -40,8 +40,7 @@ public class JooqTestPropertiesIntegrationTests { @@ -40,8 +40,7 @@ public class JooqTestPropertiesIntegrationTests {
@Test
public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0];
assertThat(profile).isEqualTo("test");
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
}
}

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

@ -40,8 +40,7 @@ public class JsonTestPropertiesIntegrationTests { @@ -40,8 +40,7 @@ public class JsonTestPropertiesIntegrationTests {
@Test
public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0];
assertThat(profile).isEqualTo("test");
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
}
}

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

@ -40,8 +40,7 @@ public class DataJpaTestPropertiesIntegrationTests { @@ -40,8 +40,7 @@ public class DataJpaTestPropertiesIntegrationTests {
@Test
public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0];
assertThat(profile).isEqualTo("test");
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
}
}

3
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/RestClientTestPropertiesIntegrationTests.java

@ -40,8 +40,7 @@ public class RestClientTestPropertiesIntegrationTests { @@ -40,8 +40,7 @@ public class RestClientTestPropertiesIntegrationTests {
@Test
public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0];
assertThat(profile).isEqualTo("test");
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
}
}

3
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/WebFluxTestPropertiesIntegrationTests.java

@ -40,8 +40,7 @@ public class WebFluxTestPropertiesIntegrationTests { @@ -40,8 +40,7 @@ public class WebFluxTestPropertiesIntegrationTests {
@Test
public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0];
assertThat(profile).isEqualTo("test");
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
}
}

3
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTestPropertiesIntegrationTests.java

@ -40,8 +40,7 @@ public class WebMvcTestPropertiesIntegrationTests { @@ -40,8 +40,7 @@ public class WebMvcTestPropertiesIntegrationTests {
@Test
public void environmentWithNewProfile() {
String profile = this.environment.getActiveProfiles()[0];
assertThat(profile).isEqualTo("test");
assertThat(this.environment.getActiveProfiles()).containsExactly("test");
}
}

4
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzer.java

@ -86,9 +86,9 @@ class NoSuchMethodFailureAnalyzer extends AbstractFailureAnalyzer<NoSuchMethodEr @@ -86,9 +86,9 @@ class NoSuchMethodFailureAnalyzer extends AbstractFailureAnalyzer<NoSuchMethodEr
private List<URL> findCandidates(String className) {
try {
return Collections.list((NoSuchMethodFailureAnalyzer.class.getClassLoader()
return Collections.list(NoSuchMethodFailureAnalyzer.class.getClassLoader()
.getResources(ClassUtils.convertClassNameToResourcePath(className)
+ ".class")));
+ ".class"));
}
catch (Throwable ex) {
return null;

2
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/MockDataSizeTypeDescriptor.java

@ -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;
/**
* Create a mock {@link TypeDescriptor} with optional {@link DataUnit} annotation.
* Create a mock {@link TypeDescriptor} with optional {@link DataSizeUnit} annotation.
*
* @author Stephane Nicoll
*/

4
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzerTests.java

@ -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;
/**
* @author awilkinson
* Tests for {@link NoSuchMethodFailureAnalyzer}.
*
* @author Andy Wilkinson
*/
@RunWith(ModifiedClassPathRunner.class)
@ClassPathOverrides("javax.servlet:servlet-api:2.5")

Loading…
Cancel
Save