From c823f44e76b231728e9aa07912efbc2aaee84c66 Mon Sep 17 00:00:00 2001 From: izeye Date: Sat, 27 Feb 2021 01:20:32 +0900 Subject: [PATCH] Polish See gh-25451 --- .../metrics/KafkaMetricsAutoConfiguration.java | 2 +- ...abledMetricsExportAutoConfigurationTests.java | 2 +- .../influx/InfluxDbHealthIndicatorTests.java | 16 ++++++++-------- .../autoconfigure/influx/InfluxDbCustomizer.java | 4 ++-- .../influx/InfluxDbAutoConfigurationTests.java | 4 ++-- .../src/docs/asciidoc/howto.adoc | 2 +- .../src/docs/asciidoc/spring-boot-features.adoc | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/KafkaMetricsAutoConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/KafkaMetricsAutoConfiguration.java index aa3bf8778a..aec99e278d 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/KafkaMetricsAutoConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/KafkaMetricsAutoConfiguration.java @@ -76,7 +76,7 @@ public class KafkaMetricsAutoConfiguration { static class KafkaStreamsMetricsConfiguration { @Bean - StreamsBuilderFactoryBeanCustomizer kafkaStreamsProducerMetrics(MeterRegistry meterRegistry) { + StreamsBuilderFactoryBeanCustomizer kafkaStreamsMetrics(MeterRegistry meterRegistry) { return (factoryBean) -> factoryBean.addListener(new KafkaStreamsMicrometerListener(meterRegistry)); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/ConditionalOnEnabledMetricsExportAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/ConditionalOnEnabledMetricsExportAutoConfigurationTests.java index 336baf2f75..9374721eb2 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/ConditionalOnEnabledMetricsExportAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/ConditionalOnEnabledMetricsExportAutoConfigurationTests.java @@ -50,7 +50,7 @@ class ConditionalOnEnabledMetricsExportAutoConfigurationTests { } @Test - void exporterCanBeGloballyDisabledWitSpecificOverride() { + void exporterCanBeGloballyDisabledWithSpecificOverride() { this.contextRunner .withPropertyValues("management.metrics.export.defaults.enabled=false", "management.metrics.export.simple.enabled=true") diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/influx/InfluxDbHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/influx/InfluxDbHealthIndicatorTests.java index 6f94f0d11f..91b42629df 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/influx/InfluxDbHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/influx/InfluxDbHealthIndicatorTests.java @@ -42,24 +42,24 @@ class InfluxDbHealthIndicatorTests { void influxDbIsUp() { Pong pong = mock(Pong.class); given(pong.getVersion()).willReturn("0.9"); - InfluxDB influxDB = mock(InfluxDB.class); - given(influxDB.ping()).willReturn(pong); - InfluxDbHealthIndicator healthIndicator = new InfluxDbHealthIndicator(influxDB); + InfluxDB influxDb = mock(InfluxDB.class); + given(influxDb.ping()).willReturn(pong); + InfluxDbHealthIndicator healthIndicator = new InfluxDbHealthIndicator(influxDb); Health health = healthIndicator.health(); assertThat(health.getStatus()).isEqualTo(Status.UP); assertThat(health.getDetails().get("version")).isEqualTo("0.9"); - verify(influxDB).ping(); + verify(influxDb).ping(); } @Test void influxDbIsDown() { - InfluxDB influxDB = mock(InfluxDB.class); - given(influxDB.ping()).willThrow(new InfluxDBException(new IOException("Connection failed"))); - InfluxDbHealthIndicator healthIndicator = new InfluxDbHealthIndicator(influxDB); + InfluxDB influxDb = mock(InfluxDB.class); + given(influxDb.ping()).willThrow(new InfluxDBException(new IOException("Connection failed"))); + InfluxDbHealthIndicator healthIndicator = new InfluxDbHealthIndicator(influxDb); Health health = healthIndicator.health(); assertThat(health.getStatus()).isEqualTo(Status.DOWN); assertThat((String) health.getDetails().get("error")).contains("Connection failed"); - verify(influxDB).ping(); + verify(influxDb).ping(); } } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/influx/InfluxDbCustomizer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/influx/InfluxDbCustomizer.java index 759eda4c8a..9e46dd17fa 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/influx/InfluxDbCustomizer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/influx/InfluxDbCustomizer.java @@ -30,8 +30,8 @@ public interface InfluxDbCustomizer { /** * Customize the {@link InfluxDB}. - * @param influxDB the influxDB instance to customize + * @param influxDb the InfluxDB instance to customize */ - void customize(InfluxDB influxDB); + void customize(InfluxDB influxDb); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/influx/InfluxDbAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/influx/InfluxDbAutoConfigurationTests.java index 90d8bbce0e..34033cd669 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/influx/InfluxDbAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/influx/InfluxDbAutoConfigurationTests.java @@ -87,8 +87,8 @@ class InfluxDbAutoConfigurationTests { } private int getReadTimeoutProperty(AssertableApplicationContext context) { - InfluxDB influxDB = context.getBean(InfluxDB.class); - Retrofit retrofit = (Retrofit) ReflectionTestUtils.getField(influxDB, "retrofit"); + InfluxDB influxDb = context.getBean(InfluxDB.class); + Retrofit retrofit = (Retrofit) ReflectionTestUtils.getField(influxDb, "retrofit"); OkHttpClient callFactory = (OkHttpClient) retrofit.callFactory(); return callFactory.readTimeoutMillis(); } diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto.adoc index 2888e6b9ed..1f666d0cf7 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto.adoc @@ -2349,7 +2349,7 @@ The sensitive portion of the URI is identified using the format `://