Polishing
This commit is contained in:
@@ -54,8 +54,9 @@ public class BindingReflectionHintsRegistrar {
|
||||
|
||||
private static final String JACKSON_ANNOTATION = "com.fasterxml.jackson.annotation.JacksonAnnotation";
|
||||
|
||||
private static final boolean jacksonAnnotationPresent = ClassUtils.isPresent(JACKSON_ANNOTATION,
|
||||
BindingReflectionHintsRegistrar.class.getClassLoader());
|
||||
private static final boolean jacksonAnnotationPresent =
|
||||
ClassUtils.isPresent(JACKSON_ANNOTATION, BindingReflectionHintsRegistrar.class.getClassLoader());
|
||||
|
||||
|
||||
/**
|
||||
* Register the necessary reflection hints to bind the specified types.
|
||||
@@ -95,12 +96,10 @@ public class BindingReflectionHintsRegistrar {
|
||||
}
|
||||
}
|
||||
if (clazz.isEnum()) {
|
||||
typeHint.withMembers(
|
||||
MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS,
|
||||
typeHint.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS,
|
||||
MemberCategory.INVOKE_PUBLIC_METHODS);
|
||||
}
|
||||
typeHint.withMembers(
|
||||
MemberCategory.DECLARED_FIELDS,
|
||||
typeHint.withMembers(MemberCategory.DECLARED_FIELDS,
|
||||
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS);
|
||||
for (Method method : clazz.getMethods()) {
|
||||
String methodName = method.getName();
|
||||
@@ -137,8 +136,7 @@ public class BindingReflectionHintsRegistrar {
|
||||
}
|
||||
|
||||
private void registerPropertyHints(ReflectionHints hints, Set<Type> seen, @Nullable Method method, int parameterIndex) {
|
||||
if (method != null && method.getDeclaringClass() != Object.class &&
|
||||
method.getDeclaringClass() != Enum.class) {
|
||||
if (method != null && method.getDeclaringClass() != Object.class && method.getDeclaringClass() != Enum.class) {
|
||||
hints.registerMethod(method, ExecutableMode.INVOKE);
|
||||
MethodParameter methodParameter = MethodParameter.forExecutable(method, parameterIndex);
|
||||
Type methodParameterType = methodParameter.getGenericParameterType();
|
||||
@@ -213,6 +211,7 @@ public class BindingReflectionHintsRegistrar {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Inner class to avoid a hard dependency on Kotlin at runtime.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -393,7 +393,7 @@ public class CacheControl {
|
||||
}
|
||||
|
||||
private void appendDirective(StringBuilder builder, String value) {
|
||||
if (builder.length() > 0) {
|
||||
if (!builder.isEmpty()) {
|
||||
builder.append(", ");
|
||||
}
|
||||
builder.append(value);
|
||||
|
||||
@@ -245,8 +245,7 @@ public final class WebAsyncManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the {@link WebAsyncManager} as wrapping a
|
||||
* multipart async request.
|
||||
* Mark the {@link WebAsyncManager} as wrapping a multipart async request.
|
||||
* @since 6.1.12
|
||||
*/
|
||||
public void setMultipartRequestParsed(boolean isMultipart) {
|
||||
|
||||
Reference in New Issue
Block a user