Skip to content

Commit 43dd22b

Browse files
committed
Polishing
(cherry picked from commit 05d9b52)
1 parent dfe437a commit 43dd22b

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

Diff for: spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBeanRuntimeHints.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 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.
@@ -36,7 +36,7 @@ class SchedulerFactoryBeanRuntimeHints implements RuntimeHintsRegistrar {
3636

3737
private static final String SCHEDULER_FACTORY_CLASS_NAME = "org.quartz.impl.StdSchedulerFactory";
3838

39-
private final ReflectiveRuntimeHintsRegistrar reflectiveRegistrar = new ReflectiveRuntimeHintsRegistrar();
39+
private static final ReflectiveRuntimeHintsRegistrar registrar = new ReflectiveRuntimeHintsRegistrar();
4040

4141

4242
@Override
@@ -48,7 +48,7 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
4848
.registerType(TypeReference.of(SCHEDULER_FACTORY_CLASS_NAME), this::typeHint)
4949
.registerTypes(TypeReference.listOf(ResourceLoaderClassLoadHelper.class,
5050
LocalTaskExecutorThreadPool.class, LocalDataSourceJobStore.class), this::typeHint);
51-
this.reflectiveRegistrar.registerRuntimeHints(hints, LocalTaskExecutorThreadPool.class);
51+
registrar.registerRuntimeHints(hints, LocalTaskExecutorThreadPool.class);
5252
}
5353

5454
private void typeHint(Builder typeHint) {

Diff for: spring-context/src/main/java/org/springframework/context/aot/ReflectiveProcessorBeanFactoryInitializationAotProcessor.java

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 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.
@@ -39,7 +39,8 @@
3939
*/
4040
class ReflectiveProcessorBeanFactoryInitializationAotProcessor implements BeanFactoryInitializationAotProcessor {
4141

42-
private static final ReflectiveRuntimeHintsRegistrar REGISTRAR = new ReflectiveRuntimeHintsRegistrar();
42+
private static final ReflectiveRuntimeHintsRegistrar registrar = new ReflectiveRuntimeHintsRegistrar();
43+
4344

4445
@Override
4546
public BeanFactoryInitializationAotContribution processAheadOfTime(ConfigurableListableBeanFactory beanFactory) {
@@ -49,7 +50,9 @@ public BeanFactoryInitializationAotContribution processAheadOfTime(ConfigurableL
4950
return new ReflectiveProcessorBeanFactoryInitializationAotContribution(beanTypes);
5051
}
5152

52-
private static class ReflectiveProcessorBeanFactoryInitializationAotContribution implements BeanFactoryInitializationAotContribution {
53+
54+
private static class ReflectiveProcessorBeanFactoryInitializationAotContribution
55+
implements BeanFactoryInitializationAotContribution {
5356

5457
private final Class<?>[] types;
5558

@@ -60,9 +63,8 @@ public ReflectiveProcessorBeanFactoryInitializationAotContribution(Class<?>[] ty
6063
@Override
6164
public void applyTo(GenerationContext generationContext, BeanFactoryInitializationCode beanFactoryInitializationCode) {
6265
RuntimeHints runtimeHints = generationContext.getRuntimeHints();
63-
REGISTRAR.registerRuntimeHints(runtimeHints, this.types);
66+
registrar.registerRuntimeHints(runtimeHints, this.types);
6467
}
65-
6668
}
6769

6870
}

Diff for: spring-core/src/main/java/org/springframework/aot/hint/annotation/Reflective.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 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.
@@ -39,8 +39,7 @@
3939
* @see ReflectiveRuntimeHintsRegistrar
4040
* @see RegisterReflectionForBinding @RegisterReflectionForBinding
4141
*/
42-
@Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE, ElementType.CONSTRUCTOR,
43-
ElementType.FIELD, ElementType.METHOD })
42+
@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD})
4443
@Retention(RetentionPolicy.RUNTIME)
4544
@Documented
4645
public @interface Reflective {

Diff for: spring-core/src/main/java/org/springframework/aot/hint/annotation/RegisterReflectionForBinding.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
*
3737
* <pre class="code">
3838
* &#064;Configuration
39-
* &#064;RegisterReflectionForBinding({ Foo.class, Bar.class })
39+
* &#064;RegisterReflectionForBinding({Foo.class, Bar.class})
4040
* public class MyConfig {
4141
* // ...
4242
* }</pre>
@@ -78,7 +78,7 @@
7878
/**
7979
* Classes for which reflection hints should be registered.
8080
* <p>At least one class must be specified either via {@link #value} or
81-
* {@link #classes}.
81+
* {@code #classes}.
8282
* @see #value()
8383
*/
8484
@AliasFor("value")

0 commit comments

Comments
 (0)