Skip to content

Commit 4f02be2

Browse files
committed
Polishing
1 parent 05d9b52 commit 4f02be2

File tree

11 files changed

+34
-28
lines changed

11 files changed

+34
-28
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
/**
2929
* {@link RuntimeHintsRegistrar} implementation that makes sure {@link SchedulerFactoryBean}
30-
* reflection entries are registered.
30+
* reflection hints are registered.
3131
*
3232
* @author Sebastien Deleuze
3333
* @author Stephane Nicoll

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@
7777

7878
/**
7979
* Classes for which reflection hints should be registered.
80-
* <p>At least one class must be specified either via {@link #value} or
81-
* {@code #classes}.
80+
* <p>At least one class must be specified either via {@link #value} or {@code classes}.
8281
* @see #value()
8382
*/
8483
@AliasFor("value")

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

+5-4
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.
@@ -48,8 +48,8 @@ class SpringFactoriesLoaderRuntimeHints implements RuntimeHintsRegistrar {
4848

4949
@Override
5050
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
51-
ClassLoader classLoaderToUse = (classLoader != null ? classLoader
52-
: SpringFactoriesLoaderRuntimeHints.class.getClassLoader());
51+
ClassLoader classLoaderToUse = (classLoader != null ? classLoader :
52+
SpringFactoriesLoaderRuntimeHints.class.getClassLoader());
5353
for (String resourceLocation : RESOURCE_LOCATIONS) {
5454
registerHints(hints, classLoaderToUse, resourceLocation);
5555
}
@@ -65,6 +65,7 @@ private void registerHints(RuntimeHints hints, ClassLoader classLoader, String r
6565

6666
private void registerHints(RuntimeHints hints, ClassLoader classLoader,
6767
String factoryClassName, List<String> implementationClassNames) {
68+
6869
Class<?> factoryClass = resolveClassName(classLoader, factoryClassName);
6970
if (factoryClass == null) {
7071
if (logger.isTraceEnabled()) {
@@ -102,6 +103,7 @@ private Class<?> resolveClassName(ClassLoader classLoader, String factoryClassNa
102103
}
103104
}
104105

106+
105107
private static class ExtendedSpringFactoriesLoader extends SpringFactoriesLoader {
106108

107109
ExtendedSpringFactoriesLoader(@Nullable ClassLoader classLoader, Map<String, List<String>> factories) {
@@ -111,7 +113,6 @@ private static class ExtendedSpringFactoriesLoader extends SpringFactoriesLoader
111113
static Map<String, List<String>> accessLoadFactoriesResource(ClassLoader classLoader, String resourceLocation) {
112114
return SpringFactoriesLoader.loadFactoriesResource(classLoader, resourceLocation);
113115
}
114-
115116
}
116117

117118
}

spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryRuntimeHints.java

+4-4
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.
@@ -24,9 +24,9 @@
2424
import org.springframework.lang.Nullable;
2525

2626
/**
27-
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints for
28-
* {@code EmbeddedDataSourceProxy#shutdown} in order to allow it to be used as a bean
29-
* destroy method.
27+
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints
28+
* for {@code EmbeddedDataSourceProxy#shutdown} in order to allow it to be used
29+
* as a bean destroy method.
3030
*
3131
* @author Sebastien Deleuze
3232
* @since 6.0

spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerRuntimeHints.java

+3-1
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.
@@ -42,6 +42,7 @@ class EntityManagerRuntimeHints implements RuntimeHintsRegistrar {
4242

4343
private static final String NATIVE_QUERY_IMPL_CLASS_NAME = "org.hibernate.query.sql.internal.NativeQueryImpl";
4444

45+
4546
@Override
4647
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
4748
if (ClassUtils.isPresent(HIBERNATE_SESSION_FACTORY_CLASS_NAME, classLoader)) {
@@ -71,4 +72,5 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
7172
catch (ClassNotFoundException ignored) {
7273
}
7374
}
75+
7476
}

spring-tx/src/main/java/org/springframework/transaction/annotation/TransactionRuntimeHints.java

+5-4
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.
@@ -24,8 +24,8 @@
2424
import org.springframework.lang.Nullable;
2525

2626
/**
27-
* {@link RuntimeHintsRegistrar} implementation that registers runtime hints for
28-
* transaction management.
27+
* {@link RuntimeHintsRegistrar} implementation that registers runtime hints
28+
* for transaction management.
2929
*
3030
* @author Sebastien Deleuze
3131
* @since 6.0
@@ -35,7 +35,8 @@ class TransactionRuntimeHints implements RuntimeHintsRegistrar {
3535

3636
@Override
3737
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
38-
hints.reflection().registerTypes(TypeReference.listOf(Isolation.class, Propagation.class),
38+
hints.reflection().registerTypes(
39+
TypeReference.listOf(Isolation.class, Propagation.class),
3940
TypeHint.builtWith(MemberCategory.DECLARED_FIELDS));
4041
}
4142

spring-web/src/main/java/org/springframework/http/converter/json/JacksonModulesRuntimeHints.java

+2-2
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.
@@ -25,7 +25,7 @@
2525
import org.springframework.lang.Nullable;
2626

2727
/**
28-
* {@link RuntimeHintsRegistrar} implementation that registers reflection entries
28+
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints
2929
* for {@link Jackson2ObjectMapperBuilder} well-known modules.
3030
*
3131
* @author Sebastien Deleuze

spring-web/src/main/java/org/springframework/http/converter/json/ProblemDetailRuntimeHints.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.
@@ -24,7 +24,7 @@
2424
import org.springframework.util.ClassUtils;
2525

2626
/**
27-
* {@link RuntimeHintsRegistrar} implementation that registers binding reflection entries
27+
* {@link RuntimeHintsRegistrar} implementation that registers binding reflection hints
2828
* for {@link ProblemDetail} serialization support with Jackson.
2929
*
3030
* @author Brian Clozel

spring-web/src/main/java/org/springframework/web/util/WebUtilRuntimeHints.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.
@@ -22,8 +22,8 @@
2222
import org.springframework.lang.Nullable;
2323

2424
/**
25-
* {@link RuntimeHintsRegistrar} implementation that registers resource
26-
* hints for web util resources.
25+
* {@link RuntimeHintsRegistrar} implementation that registers resource hints
26+
* for resources in the {@code web.util} package.
2727
*
2828
* @author Sebastien Deleuze
2929
* @since 6.0

spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/support/HandshakeWebSocketServiceRuntimeHints.java

+4-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.
@@ -22,8 +22,8 @@
2222
import org.springframework.lang.Nullable;
2323

2424
/**
25-
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints related to
26-
* {@link HandshakeWebSocketService}.
25+
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints
26+
* related to {@link HandshakeWebSocketService}.
2727
*
2828
* @author Sebastien Deleuze
2929
* @since 6.0
@@ -35,4 +35,5 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
3535
hints.reflection().registerType(HandshakeWebSocketService.initUpgradeStrategy().getClass(),
3636
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS);
3737
}
38+
3839
}

spring-websocket/src/main/java/org/springframework/web/socket/server/support/HandshakeHandlerRuntimeHints.java

+4-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.
@@ -25,7 +25,7 @@
2525
import org.springframework.util.ClassUtils;
2626

2727
/**
28-
* {@link RuntimeHintsRegistrar} implementation that registers reflection entries
28+
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints
2929
* for {@link AbstractHandshakeHandler}.
3030
*
3131
* @author Sebastien Deleuze
@@ -61,6 +61,7 @@ class HandshakeHandlerRuntimeHints implements RuntimeHintsRegistrar {
6161
"com.ibm.websphere.wsoc.WsWsocServerContainer", classLoader);
6262
}
6363

64+
6465
@Override
6566
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
6667
ReflectionHints reflectionHints = hints.reflection();
@@ -88,4 +89,5 @@ private void registerType(ReflectionHints reflectionHints, String className) {
8889
reflectionHints.registerType(TypeReference.of(className),
8990
builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS));
9091
}
92+
9193
}

0 commit comments

Comments
 (0)