From 90589fd6d48872e8b61a95067eb6194f94aa1975 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Mon, 28 Nov 2022 08:25:10 +0900 Subject: [PATCH] Polish See gh-33384 --- git/hooks/prepare-forward-merge | 4 ++-- .../autoconfigure/wavefront/WavefrontAutoConfiguration.java | 3 +-- .../prometheus/LazyTracingSpanContextSupplierTests.java | 2 +- .../boot/autoconfigure/BackgroundPreinitializer.java | 3 ++- .../src/docs/asciidoc/actuator/metrics.adoc | 4 ++-- .../src/docs/asciidoc/actuator/tracing.adoc | 6 +++--- .../src/docs/asciidoc/native-image/advanced-topics.adoc | 4 ++-- .../context/KotlinApplicationWithMainThrowingException.kt | 4 +--- 8 files changed, 14 insertions(+), 16 deletions(-) diff --git a/git/hooks/prepare-forward-merge b/git/hooks/prepare-forward-merge index 76b308e3cb..76066c51f6 100755 --- a/git/hooks/prepare-forward-merge +++ b/git/hooks/prepare-forward-merge @@ -10,7 +10,7 @@ $log = Logger.new(STDOUT) $log.level = Logger::WARN def get_fixed_issues() - $log.debug "Searching for for forward merge" + $log.debug "Searching for forward merge" rev=`git rev-parse -q --verify MERGE_HEAD`.strip $log.debug "Found #{rev} from git rev-parse" return nil unless rev @@ -65,7 +65,7 @@ if message_type != "merge" exit 0; end -$log.debug "Searching for for forward merge" +$log.debug "Searching for forward merge" fixed = get_fixed_issues() rewritten_message = rewrite_message(message_file, fixed) File.write(message_file, rewritten_message) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/wavefront/WavefrontAutoConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/wavefront/WavefrontAutoConfiguration.java index 3799d85237..e3751fdbf0 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/wavefront/WavefrontAutoConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/wavefront/WavefrontAutoConfiguration.java @@ -31,8 +31,7 @@ import org.springframework.core.env.Environment; import org.springframework.util.StringUtils; /** - * {@link EnableAutoConfiguration Auto-configuration} for for Wavefront common - * infrastructure. + * {@link EnableAutoConfiguration Auto-configuration} for Wavefront common infrastructure. * * @author Moritz Halbritter * @author Glenn Oppegard diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/prometheus/LazyTracingSpanContextSupplierTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/prometheus/LazyTracingSpanContextSupplierTests.java index 34cc42b7cd..2cc20b2ebb 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/prometheus/LazyTracingSpanContextSupplierTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/prometheus/LazyTracingSpanContextSupplierTests.java @@ -110,7 +110,7 @@ class LazyTracingSpanContextSupplierTests { } @Test - void whenCurrentSpanHasNoTraceIdThenTraceIdIsFNull() { + void whenCurrentSpanHasNoTraceIdThenTraceIdIsNull() { Span span = mock(Span.class); given(this.tracer.currentSpan()).willReturn(span); TraceContext traceContext = mock(TraceContext.class); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/BackgroundPreinitializer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/BackgroundPreinitializer.java index def33294a4..7fc2382303 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/BackgroundPreinitializer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/BackgroundPreinitializer.java @@ -101,7 +101,8 @@ public class BackgroundPreinitializer implements ApplicationListener>`" section will suffice. We're going to use the OpenTelemetry tracer with Zipkin as trace backend. @@ -77,7 +77,7 @@ All tracer implementations need the `org.springframework.boot:spring-boot-starte [[actuator.micrometer-tracing.tracer-implementations.otel-zipkin]] ==== OpenTelemetry With Zipkin -* `io.micrometer:micrometer-tracing-bridge-otel` - which is needed to bride the Micrometer Observation API to OpenTelemetry. +* `io.micrometer:micrometer-tracing-bridge-otel` - which is needed to bridge the Micrometer Observation API to OpenTelemetry. * `io.opentelemetry:opentelemetry-exporter-zipkin` - which is needed to report traces to Zipkin. @@ -85,7 +85,7 @@ All tracer implementations need the `org.springframework.boot:spring-boot-starte [[actuator.micrometer-tracing.tracer-implementations.otel-wavefront]] ==== OpenTelemetry With Wavefront -* `io.micrometer:micrometer-tracing-bridge-otel` - which is needed to bride the Micrometer Observation API to OpenTelemetry. +* `io.micrometer:micrometer-tracing-bridge-otel` - which is needed to bridge the Micrometer Observation API to OpenTelemetry. * `io.micrometer:micrometer-tracing-reporter-wavefront` - which is needed to report traces to Wavefront. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/advanced-topics.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/advanced-topics.adoc index fc82f7330a..1da9f5ee97 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/advanced-topics.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/advanced-topics.adoc @@ -157,9 +157,9 @@ include::code:MyRuntimeHints[] You can then use `@ImportRuntimeHints` on any `@Configuration` class (for example your `@SpringBootApplication` annotated application class) to activate those hints. -If you have classes which needs binding (mostly needed when serializing or deserializing JSON), you can use {spring-framework-docs}/core.html#aot-hints-register-reflection-for-binding[`@RegisterReflectionForBinding`] on any bean. +If you have classes which need binding (mostly needed when serializing or deserializing JSON), you can use {spring-framework-docs}/core.html#aot-hints-register-reflection-for-binding[`@RegisterReflectionForBinding`] on any bean. Most of the hints are automatically inferred, for example when accepting or returning data from a `@RestController` method. -But when you work with `WebClient` or `RestTemplate` directly, you might need to use `RegisterReflectionForBinding`. +But when you work with `WebClient` or `RestTemplate` directly, you might need to use `@RegisterReflectionForBinding`. [[native-image.advanced.custom-hints.testing]] ==== Testing custom hints diff --git a/spring-boot-project/spring-boot-test/src/test/kotlin/org/springframework/boot/test/context/KotlinApplicationWithMainThrowingException.kt b/spring-boot-project/spring-boot-test/src/test/kotlin/org/springframework/boot/test/context/KotlinApplicationWithMainThrowingException.kt index b1a2adbc67..7bd33d3778 100644 --- a/spring-boot-project/spring-boot-test/src/test/kotlin/org/springframework/boot/test/context/KotlinApplicationWithMainThrowingException.kt +++ b/spring-boot-project/spring-boot-test/src/test/kotlin/org/springframework/boot/test/context/KotlinApplicationWithMainThrowingException.kt @@ -2,10 +2,8 @@ package org.springframework.boot.test.context import org.springframework.boot.SpringBootConfiguration import org.springframework.boot.runApplication -import org.springframework.context.annotation.Configuration -@Configuration(proxyBeanMethods = false) -@SpringBootConfiguration +@SpringBootConfiguration(proxyBeanMethods = false) open class KotlinApplicationWithMainThrowingException { }