From 36605b3b49aa07974b3d5fb2cd5b29843ac1ac03 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 21 Jun 2018 09:16:44 +0200 Subject: [PATCH 1/2] Polish See gh-13534 --- .../ConfigurationMetadataAnnotationProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java b/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java index 37f701e540..00f4b06033 100644 --- a/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java +++ b/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java @@ -320,7 +320,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor * @param element the parent element of the field (i.e. its holding class) * @param getter {@code true} to look for the read accessor, {@code false} for the * write accessor - * @return {@code true} if this field is a public accessor of the specified type + * @return {@code true} if this field has a public accessor of the specified type */ private boolean hasLombokPublicAccessor(VariableElement field, TypeElement element, boolean getter) { From b9ea0fd5a7e52033cf02678a6e7d3191893bdaf3 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Thu, 21 Jun 2018 05:32:09 +0900 Subject: [PATCH 2/2] Polish See gh-13534 --- .../metrics/PropertiesMeterFilter.java | 13 ++++++------- .../security/servlet/EndpointRequestTests.java | 2 +- .../orm/jpa/HibernateJpaAutoConfigurationTests.java | 2 +- .../boot/autoconfigure/quartz/tables_h2.sql | 2 +- .../src/main/asciidoc/spring-boot-features.adoc | 8 ++++---- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/PropertiesMeterFilter.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/PropertiesMeterFilter.java index 130b1f7db2..2ed427e4a3 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/PropertiesMeterFilter.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/PropertiesMeterFilter.java @@ -57,14 +57,13 @@ public class PropertiesMeterFilter implements MeterFilter { @Override public DistributionStatisticConfig configure(Meter.Id id, DistributionStatisticConfig config) { - DistributionStatisticConfig.Builder builder = DistributionStatisticConfig - .builder(); Distribution distribution = this.properties.getDistribution(); - builder.percentilesHistogram( - lookup(distribution.getPercentilesHistogram(), id, null)); - builder.percentiles(lookup(distribution.getPercentiles(), id, null)); - builder.sla(convertSla(id.getType(), lookup(distribution.getSla(), id, null))); - return builder.build().merge(config); + return DistributionStatisticConfig.builder() + .percentilesHistogram( + lookup(distribution.getPercentilesHistogram(), id, null)) + .percentiles(lookup(distribution.getPercentiles(), id, null)) + .sla(convertSla(id.getType(), lookup(distribution.getSla(), id, null))) + .build().merge(config); } private long[] convertSla(Meter.Type meterType, ServiceLevelAgreementBoundary[] sla) { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequestTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequestTests.java index 12cf156d55..ac8e6f103b 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequestTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequestTests.java @@ -139,7 +139,7 @@ public class EndpointRequestTests { } @Test - public void toLinksWhenServletPathNotEmptyShouldNotMatch() { + public void toLinksWhenServletPathNotEmptyShouldMatch() { RequestMatcher matcher = EndpointRequest.toLinks(); RequestMatcherAssert assertMatcher = assertMatcher(matcher, "/actuator", "/spring"); 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 27034bfaaf..c748c9c79d 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 @@ -328,7 +328,7 @@ public class HibernateJpaAutoConfigurationTests } @Test - public void hibernatePropertiesCustomizerTakePrecedenceOverStrategyInstancesAndNamingStrategyProperties() { + public void hibernatePropertiesCustomizerTakesPrecedenceOverStrategyInstancesAndNamingStrategyProperties() { contextRunner() .withUserConfiguration( TestHibernatePropertiesCustomizerConfiguration.class, diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/quartz/tables_h2.sql b/spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/quartz/tables_h2.sql index 86074ebac2..7df6a7840b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/quartz/tables_h2.sql +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/quartz/tables_h2.sql @@ -2,7 +2,7 @@ CREATE TABLE QRTZ_TEST_TABLE ( SCHED_NAME VARCHAR(120) NOT NULL, - CALENDAR_NAME VARCHAR (200) NOT NULL + CALENDAR_NAME VARCHAR (200) NOT NULL ); ## Another comment diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 675e396984..4227fe5c43 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -903,7 +903,7 @@ Lombok does not generate any particular constructor for such a type, as it is us automatically by the container to instantiate the object. Finally, only standard Java Bean properties are considered and binding on static -properties are not supported. +properties is not supported. ==== TIP: See also the <>. The underlying component scan configuration of `@SpringBootApplication` defines exclude filters that are used to make sure slicing works as expected. If you are using an explicit -`@ComponentScan` directive on your `@SpringBootApplication`-annoted class, be aware that +`@ComponentScan` directive on your `@SpringBootApplication`-annotated class, be aware that those filters will be disabled. If you are using slicing, you should define them again. ==== @@ -7914,7 +7914,7 @@ instance lifecycle to "per-class"]. * https://try.kotlinlang.org/[Try Kotlin in your browser] * https://blog.jetbrains.com/kotlin/[Kotlin blog] * https://kotlin.link/[Awesome Kotlin] -* https://spring.io/guides/tutorials/spring-boot-kotlin/[Tutorial: building web applications with Spring Boot and Kotlin ] +* https://spring.io/guides/tutorials/spring-boot-kotlin/[Tutorial: building web applications with Spring Boot and Kotlin] * https://spring.io/blog/2016/02/15/developing-spring-boot-applications-with-kotlin[Developing Spring Boot applications with Kotlin] * https://spring.io/blog/2016/03/20/a-geospatial-messenger-with-kotlin-spring-boot-and-postgresql[A Geospatial Messenger with Kotlin, Spring Boot and PostgreSQL] * https://spring.io/blog/2017/01/04/introducing-kotlin-support-in-spring-framework-5-0[Introducing Kotlin support in Spring Framework 5.0]