diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilter.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilter.java index 4beb9dad918..033b7cbd1dd 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilter.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilter.java @@ -113,8 +113,8 @@ public class WebMvcMetricsFilter extends OncePerRequestFilter { private void filterAndRecordMetrics(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) - throws IOException, ServletException, NestedServletException { - Object handler = null; + throws IOException, ServletException { + Object handler; try { handler = getHandler(request); } @@ -149,7 +149,7 @@ public class WebMvcMetricsFilter extends OncePerRequestFilter { private void filterAndRecordMetrics(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain, Object handler) - throws IOException, ServletException, NestedServletException { + throws IOException, ServletException { TimingContext timingContext = TimingContext.get(request); if (timingContext == null) { timingContext = startAndAttachTimingContext(request, handler); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/StaticResourceLocation.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/StaticResourceLocation.java index a2bd404d281..f6d72cfcfea 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/StaticResourceLocation.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/StaticResourceLocation.java @@ -51,7 +51,7 @@ public enum StaticResourceLocation { */ FAVICON("/**/favicon.ico"); - private String[] patterns; + private final String[] patterns; StaticResourceLocation(String... patterns) { this.patterns = patterns; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/PathRequest.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/PathRequest.java index 395ad966455..93786c34105 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/PathRequest.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/PathRequest.java @@ -33,7 +33,7 @@ public final class PathRequest { /** * Returns a {@link StaticResourceRequest} that can be used to create a matcher for - * {@link StaticResourceLocation Locations}. + * {@link StaticResourceLocation locations}. * @return a {@link StaticResourceRequest} */ public static StaticResourceRequest toStaticResources() { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/StaticResourceRequest.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/StaticResourceRequest.java index bb2b2d85b4b..d059261efbf 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/StaticResourceRequest.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/StaticResourceRequest.java @@ -90,7 +90,7 @@ public final class StaticResourceRequest { /** * The server web exchange matcher used to match against resource - * {@link StaticResourceLocation Locations}. + * {@link StaticResourceLocation locations}. */ public static final class StaticResourceServerWebExchange implements ServerWebExchangeMatcher { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/servlet/PathRequest.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/servlet/PathRequest.java index 865af6cff6c..a12ed21603f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/servlet/PathRequest.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/servlet/PathRequest.java @@ -38,7 +38,7 @@ public final class PathRequest { /** * Returns a {@link StaticResourceRequest} that can be used to create a matcher for - * {@link StaticResourceLocation Locations}. + * {@link StaticResourceLocation locations}. * @return a {@link StaticResourceRequest} */ public static StaticResourceRequest toStaticResources() { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/reactive/StaticResourceRequestTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/reactive/StaticResourceRequestTests.java index 7806c8a4fff..ca02bc94285 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/reactive/StaticResourceRequestTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/reactive/StaticResourceRequestTests.java @@ -90,12 +90,10 @@ public class StaticResourceRequestTests { this.resourceRequest.atCommonLocations().excluding(null); } - private StaticResourceRequestTests.RequestMatcherAssert assertMatcher( - ServerWebExchangeMatcher matcher) { + private RequestMatcherAssert assertMatcher(ServerWebExchangeMatcher matcher) { StaticWebApplicationContext context = new StaticWebApplicationContext(); context.registerBean(ServerProperties.class); - return assertThat( - new StaticResourceRequestTests.RequestMatcherAssert(context, matcher)); + return assertThat(new RequestMatcherAssert(context, matcher)); } private static class RequestMatcherAssert implements AssertDelegateTarget { diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index 8910710d926..be3de0a2e76 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -1339,7 +1339,7 @@ provided: [source,properties,indent=0] ---- - management.metrics.export.signalfx.acesss-token=YOUR_ACCESS_TOKEN + management.metrics.export.signalfx.access-token=YOUR_ACCESS_TOKEN ---- You can also change the interval at which metrics are sent to SignalFx: diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java index 0b9629acd69..db2b60eafbb 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java @@ -260,7 +260,7 @@ public class ApplicationContextAssertTests { } @Test - public void getBeanOfTypeWhenInParentWithLimtedScopeShouldReturnNullAssert() { + public void getBeanOfTypeWhenInParentWithLimitedScopeShouldReturnNullAssert() { this.parent.registerSingleton("foo", Foo.class); assertThat(getAssert(this.context)).getBean(Foo.class, Scope.NO_ANCESTORS) .isNull(); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/SpecificEndpoint.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/SpecificEndpoint.java index b142bbb8cb4..244c3385f87 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/SpecificEndpoint.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/SpecificEndpoint.java @@ -21,7 +21,7 @@ import org.springframework.boot.configurationsample.ReadOperation; import org.springframework.lang.Nullable; /** - * An meta-annotated endpoint similar to {@code @WebEndpoint} or {@code @JmxEndpoint} in + * A meta-annotated endpoint similar to {@code @WebEndpoint} or {@code @JmxEndpoint} in * Spring Boot. Also with a package private read operation that has an optional argument. * * @author Stephane Nicoll diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/incremental/IncrementalSpecificEndpoint.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/incremental/IncrementalSpecificEndpoint.java index 368133db273..81c3e7cd9fa 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/incremental/IncrementalSpecificEndpoint.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/incremental/IncrementalSpecificEndpoint.java @@ -19,7 +19,7 @@ package org.springframework.boot.configurationsample.endpoint.incremental; import org.springframework.boot.configurationsample.MetaEndpoint; /** - * An meta-annotated endpoint similar to {@code @WebEndpoint} or {@code @JmxEndpoint} in + * A meta-annotated endpoint similar to {@code @WebEndpoint} or {@code @JmxEndpoint} in * Spring Boot. * * @author Stephane Nicoll diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java index fa0463936f1..f1feef75ada 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java @@ -47,7 +47,7 @@ import org.apache.commons.compress.archivers.jar.JarArchiveOutputStream; import org.apache.commons.compress.archivers.zip.UnixStat; /** - * Writes JAR content, ensuring valid directory entries are always create and duplicate + * Writes JAR content, ensuring valid directory entries are always created and duplicate * items are ignored. * * @author Phillip Webb @@ -247,7 +247,7 @@ public class JarWriter implements LoaderClassesWriter, AutoCloseable { } /** - * Perform the actual write of a {@link JarEntry}. All other {@code write} methods + * Perform the actual write of a {@link JarEntry}. All other write methods * delegate to this one. * @param entry the entry to write * @param entryWriter the entry writer or {@code null} if there is no content diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyReactiveWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyReactiveWebServerFactory.java index 6e8d9383fd5..fb33f5ac42b 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyReactiveWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyReactiveWebServerFactory.java @@ -92,7 +92,7 @@ public class NettyReactiveWebServerFactory extends AbstractReactiveWebServerFact /** * Set the maximum amount of time that should be waited when starting or stopping the * server. - * @param lifecycleTimeout the lefecycle timeout + * @param lifecycleTimeout the lifecycle timeout */ public void setLifecycleTimeout(Duration lifecycleTimeout) { this.lifecycleTimeout = lifecycleTimeout; diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java index cd32be94ff7..7348bfed501 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java @@ -275,15 +275,15 @@ public class ConfigurationPropertiesTests { } @Test - public void loadWhenPrefixedPropertiesDecalredAsBeanShouldBind() { - load(PrefixPropertiesDecalredAsBeanConfiguration.class, "spring.foo.name=foo"); + public void loadWhenPrefixedPropertiesDeclaredAsBeanShouldBind() { + load(PrefixPropertiesDeclaredAsBeanConfiguration.class, "spring.foo.name=foo"); PrefixProperties bean = this.context.getBean(PrefixProperties.class); assertThat(((BasicProperties) bean).name).isEqualTo("foo"); } @Test - public void loadWhenPrefixedPropertiesDecalredAsAnnotationValueShouldBind() { - load(PrefixPropertiesDecalredAsAnnotationValueConfiguration.class, + public void loadWhenPrefixedPropertiesDeclaredAsAnnotationValueShouldBind() { + load(PrefixPropertiesDeclaredAsAnnotationValueConfiguration.class, "spring.foo.name=foo"); PrefixProperties bean = this.context.getBean( "spring.foo-" + PrefixProperties.class.getName(), PrefixProperties.class); @@ -291,8 +291,8 @@ public class ConfigurationPropertiesTests { } @Test - public void loadWhenMultiplePrefixedPropertiesDecalredAsAnnotationValueShouldBind() { - load(MultiplePrefixPropertiesDecalredAsAnnotationValueConfiguration.class, + public void loadWhenMultiplePrefixedPropertiesDeclaredAsAnnotationValueShouldBind() { + load(MultiplePrefixPropertiesDeclaredAsAnnotationValueConfiguration.class, "spring.foo.name=foo", "spring.bar.name=bar"); PrefixProperties bean1 = this.context.getBean(PrefixProperties.class); AnotherPrefixProperties bean2 = this.context @@ -510,7 +510,7 @@ public class ConfigurationPropertiesTests { } @Test - public void loadWhenOverridingPropertiesWithPlaceholderResolutionInEnvionmentShouldBindWithOverride() { + public void loadWhenOverridingPropertiesWithPlaceholderResolutionInEnvironmentShouldBindWithOverride() { MutablePropertySources sources = this.context.getEnvironment() .getPropertySources(); sources.addFirst(new SystemEnvironmentPropertySource("system", @@ -790,7 +790,7 @@ public class ConfigurationPropertiesTests { @Configuration @EnableConfigurationProperties - static class PrefixPropertiesDecalredAsBeanConfiguration { + static class PrefixPropertiesDeclaredAsBeanConfiguration { @Bean public PrefixProperties prefixProperties() { @@ -801,14 +801,14 @@ public class ConfigurationPropertiesTests { @Configuration @EnableConfigurationProperties(PrefixProperties.class) - static class PrefixPropertiesDecalredAsAnnotationValueConfiguration { + static class PrefixPropertiesDeclaredAsAnnotationValueConfiguration { } @Configuration @EnableConfigurationProperties({ PrefixProperties.class, AnotherPrefixProperties.class }) - static class MultiplePrefixPropertiesDecalredAsAnnotationValueConfiguration { + static class MultiplePrefixPropertiesDeclaredAsAnnotationValueConfiguration { } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java index 3133767b344..798551c76b4 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java @@ -142,7 +142,7 @@ public class BindableTests { } @Test - public void getAnnotationWhenMatchShouldReuturnAnnotation() { + public void getAnnotationWhenMatchShouldReturnAnnotation() { Test annotation = AnnotationUtils.synthesizeAnnotation(Test.class); assertThat(Bindable.of(String.class).withAnnotations(annotation) .getAnnotation(Test.class)).isSameAs(annotation);