Browse Source

Polish

Closes gh-29928
pull/29954/head
Johnny Lim 2 years ago committed by Sébastien Deleuze
parent
commit
431ae03447
  1. 2
      framework-docs/src/docs/asciidoc/core/core-beans.adoc
  2. 2
      spring-beans/src/main/java/org/springframework/beans/factory/aot/InstanceSupplierCodeGenerator.java
  3. 4
      spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java
  4. 2
      spring-context/src/main/java/org/springframework/validation/beanvalidation/BeanValidationBeanRegistrationAotProcessor.java
  5. 2
      spring-context/src/test/java/org/springframework/validation/beanvalidation/BeanValidationBeanRegistrationAotProcessorTests.java
  6. 2
      spring-core/src/main/java/org/springframework/asm/RecordComponentWriter.java
  7. 2
      spring-core/src/main/java/org/springframework/util/InstanceFilter.java
  8. 2
      spring-core/src/test/java/org/springframework/aot/hint/BindingReflectionHintsRegistrarTests.java
  9. 3
      spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceManagedTypesBeanRegistrationAotProcessor.java
  10. 2
      spring-r2dbc/src/main/java/org/springframework/r2dbc/core/DatabaseClient.java
  11. 2
      spring-test/src/main/java/org/springframework/test/web/client/response/MockRestResponseCreators.java
  12. 2
      spring-test/src/main/java/org/springframework/test/web/servlet/result/XpathResultMatchers.java
  13. 1
      spring-test/src/test/java/org/springframework/test/web/client/response/ExecutingResponseCreatorTests.java
  14. 2
      spring-web/src/main/java/org/springframework/http/codec/protobuf/ProtobufDecoder.java
  15. 2
      spring-web/src/main/java/org/springframework/web/bind/MethodArgumentNotValidException.java
  16. 2
      spring-web/src/main/java/org/springframework/web/cors/CorsUtils.java
  17. 2
      spring-web/src/main/java/org/springframework/web/cors/reactive/CorsUtils.java

2
framework-docs/src/docs/asciidoc/core/core-beans.adoc

@ -7175,7 +7175,7 @@ to have the relevant jars in your classpath. @@ -7175,7 +7175,7 @@ to have the relevant jars in your classpath.
=====
If you use Maven, the `jakarta.inject` artifact is available in the standard Maven
repository (
https://repo1.maven.org/maven2/jakarta/inject/jakarta.inject-api/2.0.0/[https://repo1.maven.org/maven2/jakarta/inject/jakarta.inject-api/2.0.0/]).
https://repo.maven.apache.org/maven2/jakarta/inject/jakarta.inject-api/2.0.0/[https://repo.maven.apache.org/maven2/jakarta/inject/jakarta.inject-api/2.0.0/]).
You can add the following dependency to your file pom.xml:
[source,xml,indent=0,subs="verbatim,quotes"]

2
spring-beans/src/main/java/org/springframework/beans/factory/aot/InstanceSupplierCodeGenerator.java

@ -47,7 +47,7 @@ import org.springframework.util.function.ThrowingSupplier; @@ -47,7 +47,7 @@ import org.springframework.util.function.ThrowingSupplier;
* the form of a {@link BeanInstanceSupplier} that retains the executable
* that is used to instantiate the bean.
*
* <p>Generated code is usually a method reference that generate the
* <p>Generated code is usually a method reference that generates the
* {@link BeanInstanceSupplier}, but some shortcut can be used as well such as:
* <pre class="code">
* {@code InstanceSupplier.of(TheGeneratedClass::getMyBeanInstance);}

4
spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java

@ -132,10 +132,10 @@ public class JavaMailSenderImpl implements JavaMailSender { @@ -132,10 +132,10 @@ public class JavaMailSenderImpl implements JavaMailSender {
}
/**
* Allow {code Map} access to the JavaMail properties of this sender,
* Allow {@code Map} access to the JavaMail properties of this sender,
* with the option to add or override specific entries.
* <p>Useful for specifying entries directly, for example via
* {code javaMailProperties[mail.smtp.auth]}.
* {@code javaMailProperties[mail.smtp.auth]}.
*/
public Properties getJavaMailProperties() {
return this.javaMailProperties;

2
spring-context/src/main/java/org/springframework/validation/beanvalidation/BeanValidationBeanRegistrationAotProcessor.java

@ -63,7 +63,7 @@ class BeanValidationBeanRegistrationAotProcessor implements BeanRegistrationAotP @@ -63,7 +63,7 @@ class BeanValidationBeanRegistrationAotProcessor implements BeanRegistrationAotP
private static class BeanValidationDelegate {
private static Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
@Nullable
public static BeanRegistrationAotContribution processAheadOfTime(RegisteredBean registeredBean) {

2
spring-context/src/test/java/org/springframework/validation/beanvalidation/BeanValidationBeanRegistrationAotProcessorTests.java

@ -107,7 +107,7 @@ class BeanValidationBeanRegistrationAotProcessorTests { @@ -107,7 +107,7 @@ class BeanValidationBeanRegistrationAotProcessorTests {
@Repeatable(Exists.List.class)
private @interface Exists {
String message() default "Does not exists";
String message() default "Does not exist";
Class<?>[] groups() default { };

2
spring-core/src/main/java/org/springframework/asm/RecordComponentWriter.java

@ -37,7 +37,7 @@ final class RecordComponentWriter extends RecordComponentVisitor { @@ -37,7 +37,7 @@ final class RecordComponentWriter extends RecordComponentVisitor {
/** The name_index field of the Record attribute. */
private final int nameIndex;
/** The descriptor_index field of the the Record attribute. */
/** The descriptor_index field of the Record attribute. */
private final int descriptorIndex;
/**

2
spring-core/src/main/java/org/springframework/util/InstanceFilter.java

@ -64,7 +64,7 @@ public class InstanceFilter<T> { @@ -64,7 +64,7 @@ public class InstanceFilter<T> {
/**
* Determine if the specified {code instance} matches this filter.
* Determine if the specified {@code instance} matches this filter.
*/
public boolean match(T instance) {
Assert.notNull(instance, "Instance to match must not be null");

2
spring-core/src/test/java/org/springframework/aot/hint/BindingReflectionHintsRegistrarTests.java

@ -381,7 +381,7 @@ public class BindingReflectionHintsRegistrarTests { @@ -381,7 +381,7 @@ public class BindingReflectionHintsRegistrarTests {
return new Builder();
}
public Builder id(String name) {
public Builder name(String name) {
this.name = name;
return this;
}

3
spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceManagedTypesBeanRegistrationAotProcessor.java

@ -18,7 +18,6 @@ package org.springframework.orm.jpa.persistenceunit; @@ -18,7 +18,6 @@ package org.springframework.orm.jpa.persistenceunit;
import java.lang.annotation.Annotation;
import java.lang.reflect.Executable;
import java.util.Arrays;
import java.util.List;
import javax.lang.model.element.Modifier;
@ -68,7 +67,7 @@ import org.springframework.util.ReflectionUtils; @@ -68,7 +67,7 @@ import org.springframework.util.ReflectionUtils;
*/
class PersistenceManagedTypesBeanRegistrationAotProcessor implements BeanRegistrationAotProcessor {
private static final List<Class<? extends Annotation>> CALLBACK_TYPES = Arrays.asList(PreUpdate.class,
private static final List<Class<? extends Annotation>> CALLBACK_TYPES = List.of(PreUpdate.class,
PostUpdate.class, PrePersist.class, PostPersist.class, PreRemove.class, PostRemove.class, PostLoad.class);
@Nullable

2
spring-r2dbc/src/main/java/org/springframework/r2dbc/core/DatabaseClient.java

@ -84,7 +84,7 @@ public interface DatabaseClient extends ConnectionAccessor { @@ -84,7 +84,7 @@ public interface DatabaseClient extends ConnectionAccessor {
* bind markers or named parameters (e.g. {@literal :foo, :bar}) when
* {@link NamedParameterExpander} is enabled.
* <p>Accepts {@link PreparedOperation} as SQL and binding {@link Supplier}.
* <p>{code DatabaseClient} implementations should defer the resolution of
* <p>{@code DatabaseClient} implementations should defer the resolution of
* the SQL string as much as possible, ideally up to the point where a
* {@code Subscription} happens. This is the case for the default implementation.
* @param sqlSupplier a supplier for the SQL statement

2
spring-test/src/main/java/org/springframework/test/web/client/response/MockRestResponseCreators.java

@ -32,7 +32,7 @@ import org.springframework.test.web.client.ResponseCreator; @@ -32,7 +32,7 @@ import org.springframework.test.web.client.ResponseCreator;
* response.
*
* <p>In addition, see also the {@link ExecutingResponseCreator} implementation
* that performs an actual requests to remote services.
* that performs actual requests to remote services.
*
* @author Rossen Stoyanchev
* @since 3.2

2
spring-test/src/main/java/org/springframework/test/web/servlet/result/XpathResultMatchers.java

@ -83,7 +83,7 @@ public class XpathResultMatchers { @@ -83,7 +83,7 @@ public class XpathResultMatchers {
}
/**
* Get the response encoding if explicitly defined in the response, {code null} otherwise.
* Get the response encoding if explicitly defined in the response, {@code null} otherwise.
*/
@Nullable
private String getDefinedEncoding(MockHttpServletResponse response) {

1
spring-test/src/test/java/org/springframework/test/web/client/response/ExecutingResponseCreatorTests.java

@ -86,7 +86,6 @@ class ExecutingResponseCreatorTests { @@ -86,7 +86,6 @@ class ExecutingResponseCreatorTests {
.first()
.isNotSameAs(originalRequest)
.satisfies(request -> {
assertThat(request).isNotSameAs(originalRequest);
assertThat(request.isExecuted()).isTrue();
assertThat(request.getBody()).isNotSameAs(originalRequest.getBody());
assertThat(request.getHeaders()).isNotSameAs(originalRequest.getHeaders());

2
spring-web/src/main/java/org/springframework/http/codec/protobuf/ProtobufDecoder.java

@ -265,7 +265,7 @@ public class ProtobufDecoder extends ProtobufCodecSupport implements Decoder<Mes @@ -265,7 +265,7 @@ public class ProtobufDecoder extends ProtobufCodecSupport implements Decoder<Mes
* Parse message size as a varint from the input stream, updating {@code messageBytesToRead} and
* {@code offset} fields if needed to allow processing of upcoming chunks.
* Inspired from {@link CodedInputStream#readRawVarint32(int, java.io.InputStream)}
* @return {code true} when the message size is parsed successfully, {code false} when the message size is
* @return {@code true} when the message size is parsed successfully, {@code false} when the message size is
* truncated
* @see <a href="https://developers.google.com/protocol-buffers/docs/encoding#varints">Base 128 Varints</a>
*/

2
spring-web/src/main/java/org/springframework/web/bind/MethodArgumentNotValidException.java

@ -113,7 +113,7 @@ public class MethodArgumentNotValidException extends BindException implements Er @@ -113,7 +113,7 @@ public class MethodArgumentNotValidException extends BindException implements Er
/**
* Resolve global and field errors to messages with the given
* {@link MessageSource} and {@link Locale}.
* @return a Map with errors as key and resolves messages as value
* @return a Map with errors as key and resolved messages as value
* @since 6.0.3
*/
public Map<ObjectError, String> resolveErrorMessages(MessageSource messageSource, Locale locale) {

2
spring-web/src/main/java/org/springframework/web/cors/CorsUtils.java

@ -66,7 +66,7 @@ public abstract class CorsUtils { @@ -66,7 +66,7 @@ public abstract class CorsUtils {
}
/**
* Returns {@code true} if the request is a valid CORS pre-flight one by checking {code OPTIONS} method with
* Returns {@code true} if the request is a valid CORS pre-flight one by checking {@code OPTIONS} method with
* {@code Origin} and {@code Access-Control-Request-Method} headers presence.
*/
public static boolean isPreFlightRequest(HttpServletRequest request) {

2
spring-web/src/main/java/org/springframework/web/cors/reactive/CorsUtils.java

@ -45,7 +45,7 @@ public abstract class CorsUtils { @@ -45,7 +45,7 @@ public abstract class CorsUtils {
}
/**
* Returns {@code true} if the request is a valid CORS pre-flight one by checking {code OPTIONS} method with
* Returns {@code true} if the request is a valid CORS pre-flight one by checking {@code OPTIONS} method with
* {@code Origin} and {@code Access-Control-Request-Method} headers presence.
*/
public static boolean isPreFlightRequest(ServerHttpRequest request) {

Loading…
Cancel
Save