Merge pull request #18192 from izeye

* pr/18192:
  Polish

Closes gh-18192
pull/18214/head
Stephane Nicoll 5 years ago
commit d86c72bf73

@ -13,7 +13,7 @@ reproduces the problem.
== Stack Overflow == Stack Overflow
The Spring Boot community monitors the The Spring Boot community monitors the
https://stackoverflow.com/tags/spring-boot[`spring-boot`] tag on Stack Overflow. Before https://stackoverflow.com/tags/spring-boot[`spring-boot`] tag on Stack Overflow. Before
asking a question, please familiar yourself with Stack Overflow's asking a question, please familiarize yourself with Stack Overflow's
https://stackoverflow.com/help/how-to-ask[advice on how to ask a good question]. https://stackoverflow.com/help/how-to-ask[advice on how to ask a good question].
== Gitter == Gitter

@ -21,7 +21,7 @@ import io.micrometer.kairos.KairosConfig;
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter; import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter;
/** /**
* Adapter to convert {@link KairosProperties} to an {@link KairosConfig}. * Adapter to convert {@link KairosProperties} to a {@link KairosConfig}.
* *
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */

@ -41,7 +41,7 @@ class AppOpticsPropertiesConfigAdapterTests
} }
@Test @Test
void whenPropertiesUrisIsSetAdapterUriReturnsIt() { void whenPropertiesUriIsSetAdapterUriReturnsIt() {
AppOpticsProperties properties = createProperties(); AppOpticsProperties properties = createProperties();
properties.setUri("https://appoptics.example.com/v1/measurements"); properties.setUri("https://appoptics.example.com/v1/measurements");
assertThat(createConfigAdapter(properties).uri()).isEqualTo("https://appoptics.example.com/v1/measurements"); assertThat(createConfigAdapter(properties).uri()).isEqualTo("https://appoptics.example.com/v1/measurements");

@ -116,16 +116,16 @@ class DynatraceMetricsExportAutoConfigurationTests {
@Bean @Bean
DynatraceConfig customConfig() { DynatraceConfig customConfig() {
return (key) -> { return (key) -> {
if ("dynatrace.uri".equals(key)) { switch (key) {
case "dynatrace.uri":
return "https://dynatrace.example.com"; return "https://dynatrace.example.com";
} case "dynatrace.apiToken":
if ("dynatrace.apiToken".equals(key)) {
return "abcde"; return "abcde";
} case "dynatrace.deviceId":
if ("dynatrace.deviceId".equals(key)) {
return "test"; return "test";
default:
return null;
} }
return null;
}; };
} }

@ -41,7 +41,7 @@ class KairosPropertiesConfigAdapterTests
} }
@Test @Test
void whenPropertiesUrisIsSetAdapterUriReturnsIt() { void whenPropertiesUriIsSetAdapterUriReturnsIt() {
KairosProperties properties = createProperties(); KairosProperties properties = createProperties();
properties.setUri("https://kairos.example.com:8080/api/v1/datapoints"); properties.setUri("https://kairos.example.com:8080/api/v1/datapoints");
assertThat(createConfigAdapter(properties).uri()) assertThat(createConfigAdapter(properties).uri())

@ -134,8 +134,8 @@ public class SessionAutoConfiguration {
} }
/** /**
* Customization log for {@link SpringSessionRememberMeServices} that is only * Customization for {@link SpringSessionRememberMeServices} that is only instantiated
* instantiated when Spring Security is on the classpath. * when Spring Security is on the classpath.
*/ */
static class RememberMeServicesCookieSerializerCustomizer { static class RememberMeServicesCookieSerializerCustomizer {

@ -290,7 +290,7 @@ abstract class AbstractJpaAutoConfigurationTests {
static class TestFilterRegistrationConfiguration { static class TestFilterRegistrationConfiguration {
@Bean @Bean
FilterRegistrationBean<OpenEntityManagerInViewFilter> OpenEntityManagerInViewFilterFilterRegistrationBean() { FilterRegistrationBean<OpenEntityManagerInViewFilter> openEntityManagerInViewFilterFilterRegistrationBean() {
return new FilterRegistrationBean<>(); return new FilterRegistrationBean<>();
} }

@ -779,7 +779,7 @@ In order to document default values for properties in the class above, you could
{"properties": [ {"properties": [
{ {
"name": "acme.messaging.addresses", "name": "acme.messaging.addresses",
"defaultValue": ["a, b"] "defaultValue": ["a", "b"]
}, },
{ {
"name": "acme.messaging.container-type", "name": "acme.messaging.container-type",

@ -683,7 +683,7 @@ The following `HealthIndicators` are auto-configured by Spring Boot when appropr
| Checks that an Elasticsearch cluster is up. | Checks that an Elasticsearch cluster is up.
| {spring-boot-actuator-module-code}/hazelcast/HazelcastHealthIndicator.java[`HazelcastHealthIndicator`] | {spring-boot-actuator-module-code}/hazelcast/HazelcastHealthIndicator.java[`HazelcastHealthIndicator`]
| Checks that an Hazelcast server is up. | Checks that a Hazelcast server is up.
| {spring-boot-actuator-module-code}/influx/InfluxDbHealthIndicator.java[`InfluxDbHealthIndicator`] | {spring-boot-actuator-module-code}/influx/InfluxDbHealthIndicator.java[`InfluxDbHealthIndicator`]
| Checks that an InfluxDB server is up. | Checks that an InfluxDB server is up.

@ -3984,7 +3984,7 @@ You can configure the uri and credentials to use by setting the `spring.data.neo
spring.data.neo4j.password=secret spring.data.neo4j.password=secret
---- ----
You can take full control over the session creation by either adding a `org.neo4j.ogm.config.Configuration` bean or a `org.neo4j.ogm.session.SessionFactory` bean. You can take full control over the session creation by adding either an `org.neo4j.ogm.config.Configuration` bean or an `org.neo4j.ogm.session.SessionFactory` bean.

@ -148,7 +148,7 @@ do as they were designed before this was clarified.
| https://orika-mapper.github.io/orika-docs/[Orika] | https://orika-mapper.github.io/orika-docs/[Orika]
| https://github.com/akihyro/orika-spring-boot-starter | https://github.com/akihyro/orika-spring-boot-starter
| https://pebbletemplates.io/[Pebbles Templates] | https://pebbletemplates.io/[Pebble Templates]
| https://github.com/PebbleTemplates/pebble | https://github.com/PebbleTemplates/pebble
| https://picocli.info/[picocli] | https://picocli.info/[picocli]

@ -134,10 +134,12 @@ public class BootJar extends Jar implements BootArchive {
classpath); classpath);
} }
@Override
public void setClasspath(Object classpath) { public void setClasspath(Object classpath) {
this.classpath = getProject().files(classpath); this.classpath = getProject().files(classpath);
} }
@Override
public void setClasspath(FileCollection classpath) { public void setClasspath(FileCollection classpath) {
this.classpath = getProject().files(classpath); this.classpath = getProject().files(classpath);
} }

@ -130,7 +130,7 @@ public class Binder {
* @param propertyEditorInitializer initializer used to configure the property editors * @param propertyEditorInitializer initializer used to configure the property editors
* that can convert values (or {@code null} if no initialization is required). Often * that can convert values (or {@code null} if no initialization is required). Often
* used to call {@link ConfigurableListableBeanFactory#copyRegisteredEditorsTo}. * used to call {@link ConfigurableListableBeanFactory#copyRegisteredEditorsTo}.
* @param defaultBindHandler the default bind handler to use if non is specified when * @param defaultBindHandler the default bind handler to use if none is specified when
* binding * binding
* @since 2.2.0 * @since 2.2.0
*/ */
@ -469,7 +469,7 @@ public class Binder {
* Create a new {@link Binder} instance from the specified environment. * Create a new {@link Binder} instance from the specified environment.
* @param environment the environment source (must have attached * @param environment the environment source (must have attached
* {@link ConfigurationPropertySources}) * {@link ConfigurationPropertySources})
* @param defaultBindHandler the default bind handler to use if non is specified when * @param defaultBindHandler the default bind handler to use if none is specified when
* binding * binding
* @return a {@link Binder} instance * @return a {@link Binder} instance
* @since 2.2.0 * @since 2.2.0

@ -211,7 +211,7 @@ class BinderTests {
} }
@Test @Test
void bindWhenHasCustomDefultHandlerShouldTriggerOnSuccess() { void bindWhenHasCustomDefaultHandlerShouldTriggerOnSuccess() {
this.sources.add(new MockConfigurationPropertySource("foo.value", "bar", "line1")); this.sources.add(new MockConfigurationPropertySource("foo.value", "bar", "line1"));
BindHandler handler = mock(BindHandler.class, Answers.CALLS_REAL_METHODS); BindHandler handler = mock(BindHandler.class, Answers.CALLS_REAL_METHODS);
Binder binder = new Binder(this.sources, null, null, null, handler); Binder binder = new Binder(this.sources, null, null, null, handler);

@ -170,8 +170,8 @@ class SpringApplicationJsonEnvironmentPostProcessorTests {
assertThat(this.environment.getPropertySources()).containsSequence(custom, json, servlet, jndi); assertThat(this.environment.getPropertySources()).containsSequence(custom, json, servlet, jndi);
} }
private void testServletPropertySource(String servletContextPropertySourceName) { private void testServletPropertySource(String servletPropertySourceName) {
this.environment.getPropertySources().addFirst(getPropertySource(servletContextPropertySourceName, "servlet")); this.environment.getPropertySources().addFirst(getPropertySource(servletPropertySourceName, "servlet"));
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.environment, TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.environment,
"SPRING_APPLICATION_JSON={\"foo\":\"bar\"}"); "SPRING_APPLICATION_JSON={\"foo\":\"bar\"}");
this.processor.postProcessEnvironment(this.environment, null); this.processor.postProcessEnvironment(this.environment, null);

Loading…
Cancel
Save