From f9f73aa14684f96b2e6fb699939b1857daeda2f7 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Thu, 23 Nov 2023 08:43:16 +0900 Subject: [PATCH] Polish See gh-38508 --- .../ConcurrentKafkaListenerContainerFactoryConfigurer.java | 2 +- .../boot/autoconfigure/kafka/KafkaAutoConfiguration.java | 2 +- .../boot/autoconfigure/kafka/KafkaProperties.java | 4 ++-- .../spring-boot-docs/src/docs/asciidoc/howto/data-access.adoc | 2 +- .../spring-boot-docs/src/docs/asciidoc/web/servlet.adoc | 2 +- .../org/springframework/boot/loader/jar/NestedJarFile.java | 2 +- .../boot/loader/net/protocol/jar/UrlJarFileFactory.java | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java index 95108c275e0d..86cfd258ee93 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java @@ -236,7 +236,7 @@ private void configureContainer(ContainerProperties container) { map.from(properties::getLogContainerConfig).to(container::setLogContainerConfig); map.from(properties::isMissingTopicsFatal).to(container::setMissingTopicsFatal); map.from(properties::isImmediateStop).to(container::setStopImmediate); - map.from(properties::getObservationEnabled).to(container::setObservationEnabled); + map.from(properties::isObservationEnabled).to(container::setObservationEnabled); map.from(this.transactionManager).to(container::setTransactionManager); map.from(this.rebalanceListener).to(container::setConsumerRebalanceListener); map.from(this.listenerTaskExecutor).to(container::setListenerTaskExecutor); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java index b9d2edc045f7..18e02adb854a 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java @@ -98,7 +98,7 @@ PropertiesKafkaConnectionDetails kafkaConnectionDetails(KafkaProperties properti map.from(kafkaProducerListener).to(kafkaTemplate::setProducerListener); map.from(this.properties.getTemplate().getDefaultTopic()).to(kafkaTemplate::setDefaultTopic); map.from(this.properties.getTemplate().getTransactionIdPrefix()).to(kafkaTemplate::setTransactionIdPrefix); - map.from(this.properties.getTemplate().getObservationEnabled()).to(kafkaTemplate::setObservationEnabled); + map.from(this.properties.getTemplate().isObservationEnabled()).to(kafkaTemplate::setObservationEnabled); return kafkaTemplate; } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java index f1ad2df87e0e..20085141e501 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java @@ -1005,7 +1005,7 @@ public void setTransactionIdPrefix(String transactionIdPrefix) { this.transactionIdPrefix = transactionIdPrefix; } - public boolean getObservationEnabled() { + public boolean isObservationEnabled() { return this.observationEnabled; } @@ -1279,7 +1279,7 @@ public void setChangeConsumerThreadName(Boolean changeConsumerThreadName) { this.changeConsumerThreadName = changeConsumerThreadName; } - public boolean getObservationEnabled() { + public boolean isObservationEnabled() { return this.observationEnabled; } diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/data-access.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/data-access.adoc index 50d30a2c2d96..5c5894d83724 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/data-access.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/data-access.adoc @@ -150,7 +150,7 @@ Note that each `configuration` sub namespace provides advanced settings based on [[howto.data-access.spring-data-repositories]] === Use Spring Data Repositories Spring Data can create implementations of `@Repository` interfaces of various flavors. -Spring Boot handles all of that for you, as long as those `@Repositories` are included in one of the <>, typically the package (or a sub-package) of your main application class that is annotated with `@SpringBootApplication` or `@EnableAutoConfiguration`. +Spring Boot handles all of that for you, as long as those `@Repository` annotations are included in one of the <>, typically the package (or a sub-package) of your main application class that is annotated with `@SpringBootApplication` or `@EnableAutoConfiguration`. For many applications, all you need is to put the right Spring Data dependencies on your classpath. There is a `spring-boot-starter-data-jpa` for JPA, `spring-boot-starter-data-mongodb` for Mongodb, and various other starters for supported technologies. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc index 538487db2660..19503eab0796 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc @@ -624,7 +624,7 @@ include::code:MySameSiteConfiguration[] The character encoding behavior of the embedded servlet container for request and response handling can be configured using the `server.servlet.encoding.*` configuration properties. When a request's `Accept-Language` header indicates a locale for the request it will be automatically mapped to a charset by the servlet container. -Each containers providers default locale to charset mappings and you should verify that they meet your application's needs. +Each container provides default locale to charset mappings and you should verify that they meet your application's needs. When they do not, use the configprop:server.servlet.encoding.mapping[] configuration property to customize the mappings, as shown in the following example: [source,yaml,indent=0,subs="verbatim",configprops,configblocks] diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/NestedJarFile.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/NestedJarFile.java index bddd274e22b9..401157b17d95 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/NestedJarFile.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/NestedJarFile.java @@ -814,7 +814,7 @@ private class RawZipDataInputStream extends FilterInputStream { private volatile boolean closed; - protected RawZipDataInputStream(InputStream in) { + RawZipDataInputStream(InputStream in) { super(in); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/net/protocol/jar/UrlJarFileFactory.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/net/protocol/jar/UrlJarFileFactory.java index b35bc2435c45..208c5e9478fa 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/net/protocol/jar/UrlJarFileFactory.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/net/protocol/jar/UrlJarFileFactory.java @@ -60,7 +60,7 @@ JarFile createJarFile(URL jarFileUrl, Consumer closeAction) throws IOEx private Runtime.Version getVersion(URL url) { // The standard JDK handler uses #runtime to indicate that the runtime version // should be used. This unfortunately doesn't work for us as - // jdk.internal.loaderURLClassPath only adds the runtime fragment when the URL + // jdk.internal.loader.URLClassPath only adds the runtime fragment when the URL // is using the internal JDK handler. We need to flip the default to use // the runtime version. See gh-38050 return "base".equals(url.getRef()) ? JarFile.baseVersion() : JarFile.runtimeVersion();