Skip to content

Commit d0bff58

Browse files
committed
Polishing
1 parent 8be5010 commit d0bff58

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

spring-core/src/main/java/org/springframework/aot/hint/BindingReflectionHintsRegistrar.java

+7-8
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ public class BindingReflectionHintsRegistrar {
5454

5555
private static final String JACKSON_ANNOTATION = "com.fasterxml.jackson.annotation.JacksonAnnotation";
5656

57-
private static final boolean jacksonAnnotationPresent = ClassUtils.isPresent(JACKSON_ANNOTATION,
58-
BindingReflectionHintsRegistrar.class.getClassLoader());
57+
private static final boolean jacksonAnnotationPresent =
58+
ClassUtils.isPresent(JACKSON_ANNOTATION, BindingReflectionHintsRegistrar.class.getClassLoader());
59+
5960

6061
/**
6162
* Register the necessary reflection hints to bind the specified types.
@@ -95,12 +96,10 @@ private void registerReflectionHints(ReflectionHints hints, Set<Type> seen, Type
9596
}
9697
}
9798
if (clazz.isEnum()) {
98-
typeHint.withMembers(
99-
MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS,
99+
typeHint.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS,
100100
MemberCategory.INVOKE_PUBLIC_METHODS);
101101
}
102-
typeHint.withMembers(
103-
MemberCategory.DECLARED_FIELDS,
102+
typeHint.withMembers(MemberCategory.DECLARED_FIELDS,
104103
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS);
105104
for (Method method : clazz.getMethods()) {
106105
String methodName = method.getName();
@@ -137,8 +136,7 @@ private void registerRecordHints(ReflectionHints hints, Set<Type> seen, Method m
137136
}
138137

139138
private void registerPropertyHints(ReflectionHints hints, Set<Type> seen, @Nullable Method method, int parameterIndex) {
140-
if (method != null && method.getDeclaringClass() != Object.class &&
141-
method.getDeclaringClass() != Enum.class) {
139+
if (method != null && method.getDeclaringClass() != Object.class && method.getDeclaringClass() != Enum.class) {
142140
hints.registerMethod(method, ExecutableMode.INVOKE);
143141
MethodParameter methodParameter = MethodParameter.forExecutable(method, parameterIndex);
144142
Type methodParameterType = methodParameter.getGenericParameterType();
@@ -213,6 +211,7 @@ private void registerHintsForClassAttributes(ReflectionHints hints, MergedAnnota
213211
});
214212
}
215213

214+
216215
/**
217216
* Inner class to avoid a hard dependency on Kotlin at runtime.
218217
*/

spring-web/src/main/java/org/springframework/http/CacheControl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -393,7 +393,7 @@ private String toHeaderValue() {
393393
}
394394

395395
private void appendDirective(StringBuilder builder, String value) {
396-
if (builder.length() > 0) {
396+
if (!builder.isEmpty()) {
397397
builder.append(", ");
398398
}
399399
builder.append(value);

spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ public void registerDeferredResultInterceptors(DeferredResultProcessingIntercept
245245
}
246246

247247
/**
248-
* Mark the {@link WebAsyncManager} as wrapping a
249-
* multipart async request.
248+
* Mark the {@link WebAsyncManager} as wrapping a multipart async request.
250249
* @since 6.1.12
251250
*/
252251
public void setMultipartRequestParsed(boolean isMultipart) {

0 commit comments

Comments
 (0)