From 852e5778a36dd0d439387ac26df0961702caca79 Mon Sep 17 00:00:00 2001 From: izeye Date: Fri, 2 Apr 2021 22:58:03 +0900 Subject: [PATCH 1/2] Polish See gh-25875 --- .../web/servlet/AbstractWebMvcEndpointHandlerMapping.java | 4 ++-- .../boot/autoconfigure/condition/ConditionMessage.java | 2 +- .../integration/IntegrationAutoConfiguration.java | 2 +- .../mongo/embedded/DownloadConfigBuilderCustomizer.java | 2 +- .../orm/jpa/HibernateJpaAutoConfigurationTests.java | 6 +++--- .../src/docs/asciidoc/production-ready-features.adoc | 2 +- ...ureMockRestServiceServerWithRootUriIntegrationTests.java | 2 +- .../java/org/springframework/boot/BootstrapRegistry.java | 4 ++-- .../context/config/InactiveConfigDataAccessException.java | 2 +- .../context/config/InvalidConfigDataPropertyException.java | 2 +- .../boot/web/client/RootUriTemplateHandler.java | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java index 9df8c52a02b..d8f9a216d52 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java @@ -402,8 +402,8 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin } /** - * Nested exception used to wrap a {@link InvalidEndpointRequestException} and provide - * a {@link HttpStatus#BAD_REQUEST} status. + * Nested exception used to wrap an {@link InvalidEndpointRequestException} and + * provide a {@link HttpStatus#BAD_REQUEST} status. */ private static class InvalidEndpointBadRequestException extends ResponseStatusException { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java index 969e5594266..1011d00b804 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java @@ -306,7 +306,7 @@ public final class ConditionMessage { } /** - * Builder used to create a {@link ItemsBuilder} for a condition. + * Builder used to create an {@link ItemsBuilder} for a condition. */ public final class ItemsBuilder { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java index 04de88bf08a..80b7f5f7c03 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java @@ -161,7 +161,7 @@ public class IntegrationAutoConfiguration { protected static class IntegrationRSocketConfiguration { /** - * Check if either a {@link IntegrationRSocketEndpoint} or + * Check if either an {@link IntegrationRSocketEndpoint} or * {@link RSocketOutboundGateway} bean is available. */ static class AnyRSocketChannelAdapterAvailable extends AnyNestedCondition { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/DownloadConfigBuilderCustomizer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/DownloadConfigBuilderCustomizer.java index bf623c15767..98681b76be6 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/DownloadConfigBuilderCustomizer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/DownloadConfigBuilderCustomizer.java @@ -21,7 +21,7 @@ import de.flapdoodle.embed.process.config.store.IDownloadConfig; /** * Callback interface that can be implemented by beans wishing to customize the - * {@link IDownloadConfig} via a {@link DownloadConfigBuilder} whilst retaining default + * {@link IDownloadConfig} via an {@link DownloadConfigBuilder} whilst retaining default * auto-configuration. * * @author Michael Gmeiner diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfigurationTests.java index be3c215f360..9bbd025bb98 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfigurationTests.java @@ -381,7 +381,7 @@ class HibernateJpaAutoConfigurationTests extends AbstractJpaAutoConfigurationTes } @Test - void vendorPropertiesWithDdlAutoPropertyIsSet() { + void vendorPropertiesWhenDdlAutoPropertyIsSet() { contextRunner().withPropertyValues("spring.jpa.hibernate.ddl-auto=update") .run(vendorProperties((vendorProperties) -> { assertThat(vendorProperties).doesNotContainKeys(AvailableSettings.HBM2DDL_DATABASE_ACTION); @@ -390,7 +390,7 @@ class HibernateJpaAutoConfigurationTests extends AbstractJpaAutoConfigurationTes } @Test - void vendorPropertiesWithDdlAutoPropertyAndHibernatePropertiesAreSet() { + void vendorPropertiesWhenDdlAutoPropertyAndHibernatePropertiesAreSet() { contextRunner() .withPropertyValues("spring.jpa.hibernate.ddl-auto=update", "spring.jpa.properties.hibernate.hbm2ddl.auto=create-drop") @@ -401,7 +401,7 @@ class HibernateJpaAutoConfigurationTests extends AbstractJpaAutoConfigurationTes } @Test - void vendorPropertiesWithDdlAutoPropertyIsSetToNone() { + void vendorPropertiesWhenDdlAutoPropertyIsSetToNone() { contextRunner().withPropertyValues("spring.jpa.hibernate.ddl-auto=none") .run(vendorProperties((vendorProperties) -> assertThat(vendorProperties).doesNotContainKeys( AvailableSettings.HBM2DDL_DATABASE_ACTION, AvailableSettings.HBM2DDL_AUTO))); diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc index fd476a94cce..eb69dc137e2 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc @@ -2343,7 +2343,7 @@ Each metric is tagged by the name of the Pool (can be controlled with `spring.da [[production-ready-metrics-hibernate]] ==== Hibernate Metrics -Auto-configuration enables the instrumentation of all available Hibernate `EntityManagerFactory` instances that have statistics enabled with a metric named `hibernate`. +Auto-configuration enables the instrumentation of all available Hibernate `EntityManagerFactory` instances that have statistics enabled are instrumented with a metric named `hibernate`. Metrics are also tagged by the name of the `EntityManagerFactory` that is derived from the bean name. diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/AutoConfigureMockRestServiceServerWithRootUriIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/AutoConfigureMockRestServiceServerWithRootUriIntegrationTests.java index 67c98a959ef..8021d1f7c0b 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/AutoConfigureMockRestServiceServerWithRootUriIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/AutoConfigureMockRestServiceServerWithRootUriIntegrationTests.java @@ -42,7 +42,7 @@ import static org.springframework.test.web.client.response.MockRestResponseCreat * * @author Andy Wilkinson */ -@SpringBootTest(properties = "debug=true") +@SpringBootTest @AutoConfigureMockRestServiceServer class AutoConfigureMockRestServiceServerWithRootUriIntegrationTests { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java index c12d65a59a1..65a0aeae4c8 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java @@ -139,7 +139,7 @@ public interface BootstrapRegistry { } /** - * Factory method that can be used to create a {@link InstanceSupplier} for a + * Factory method that can be used to create an {@link InstanceSupplier} for a * given instance. * @param the instance type * @param instance the instance @@ -150,7 +150,7 @@ public interface BootstrapRegistry { } /** - * Factory method that can be used to create a {@link InstanceSupplier} from a + * Factory method that can be used to create an {@link InstanceSupplier} from a * {@link Supplier}. * @param the instance type * @param supplier the supplier that will provide the instance diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/InactiveConfigDataAccessException.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/InactiveConfigDataAccessException.java index 143e68932b5..b2968fb6ce6 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/InactiveConfigDataAccessException.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/InactiveConfigDataAccessException.java @@ -111,7 +111,7 @@ public class InactiveConfigDataAccessException extends ConfigDataException { } /** - * Throw a {@link InactiveConfigDataAccessException} if the given + * Throw an {@link InactiveConfigDataAccessException} if the given * {@link ConfigDataEnvironmentContributor} contains the property. * @param contributor the contributor to check * @param name the name to check diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/InvalidConfigDataPropertyException.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/InvalidConfigDataPropertyException.java index 141dd469aa3..3443242d823 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/InvalidConfigDataPropertyException.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/InvalidConfigDataPropertyException.java @@ -101,7 +101,7 @@ public class InvalidConfigDataPropertyException extends ConfigDataException { } /** - * Throw a {@link InvalidConfigDataPropertyException} or log a warning if the given + * Throw an {@link InvalidConfigDataPropertyException} or log a warning if the given * {@link ConfigDataEnvironmentContributor} contains any invalid property. A warning * is logged if the property is still supported, but not recommended. An error is * thrown if the property is completely unsupported. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/RootUriTemplateHandler.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/RootUriTemplateHandler.java index c6091c36abe..59242dcbd59 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/RootUriTemplateHandler.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/RootUriTemplateHandler.java @@ -87,7 +87,7 @@ public class RootUriTemplateHandler implements UriTemplateHandler { /** * Derives a new {@code RootUriTemplateHandler} from this one, wrapping its delegate - * {link UriTemplateHandler} by applying the given {@code wrapper}. + * {@link UriTemplateHandler} by applying the given {@code wrapper}. * @param wrapper the wrapper to apply to the delegate URI template handler * @return the new handler * @since 2.3.10 From db3dfffdca49cf8f12573f43b968abb2f22d127d Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Sun, 4 Apr 2021 11:15:49 +0200 Subject: [PATCH 2/2] Polish contribution See gh-25875 --- .../boot/autoconfigure/condition/ConditionMessage.java | 2 +- .../autoconfigure/integration/IntegrationAutoConfiguration.java | 2 +- .../mongo/embedded/DownloadConfigBuilderCustomizer.java | 2 +- .../src/docs/asciidoc/production-ready-features.adoc | 2 +- .../main/java/org/springframework/boot/BootstrapRegistry.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java index 1011d00b804..42c9826464a 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java index 80b7f5f7c03..dc6f10b87b6 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/DownloadConfigBuilderCustomizer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/DownloadConfigBuilderCustomizer.java index 98681b76be6..bf623c15767 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/DownloadConfigBuilderCustomizer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/DownloadConfigBuilderCustomizer.java @@ -21,7 +21,7 @@ import de.flapdoodle.embed.process.config.store.IDownloadConfig; /** * Callback interface that can be implemented by beans wishing to customize the - * {@link IDownloadConfig} via an {@link DownloadConfigBuilder} whilst retaining default + * {@link IDownloadConfig} via a {@link DownloadConfigBuilder} whilst retaining default * auto-configuration. * * @author Michael Gmeiner diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc index eb69dc137e2..fd476a94cce 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc @@ -2343,7 +2343,7 @@ Each metric is tagged by the name of the Pool (can be controlled with `spring.da [[production-ready-metrics-hibernate]] ==== Hibernate Metrics -Auto-configuration enables the instrumentation of all available Hibernate `EntityManagerFactory` instances that have statistics enabled are instrumented with a metric named `hibernate`. +Auto-configuration enables the instrumentation of all available Hibernate `EntityManagerFactory` instances that have statistics enabled with a metric named `hibernate`. Metrics are also tagged by the name of the `EntityManagerFactory` that is derived from the bean name. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java index 65a0aeae4c8..c3637c652c1 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.