diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java index 770a447aefb8..6407e3bd8d17 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java @@ -654,7 +654,7 @@ private Object resolvedCachedArgument(@Nullable String beanName, @Nullable Objec /** * Base class representing injection information. */ - private abstract class AutowiredElement extends InjectionMetadata.InjectedElement { + private abstract static class AutowiredElement extends InjectionMetadata.InjectedElement { protected final boolean required; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanDefinitionPropertyValueCodeGenerator.java b/spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanDefinitionPropertyValueCodeGenerator.java index b8ea68b23c4b..c87bfce918e9 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanDefinitionPropertyValueCodeGenerator.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanDefinitionPropertyValueCodeGenerator.java @@ -119,7 +119,7 @@ private interface Delegate { /** * {@link Delegate} for {@code primitive} types. */ - private class PrimitiveDelegate implements Delegate { + private static class PrimitiveDelegate implements Delegate { private static final Map CHAR_ESCAPES; @@ -177,7 +177,7 @@ private String escape(char ch) { /** * {@link Delegate} for {@link String} types. */ - private class StringDelegate implements Delegate { + private static class StringDelegate implements Delegate { @Override @Nullable @@ -194,7 +194,7 @@ public CodeBlock generateCode(Object value, ResolvableType type) { /** * {@link Delegate} for {@link Enum} types. */ - private class EnumDelegate implements Delegate { + private static class EnumDelegate implements Delegate { @Override @Nullable @@ -212,7 +212,7 @@ public CodeBlock generateCode(Object value, ResolvableType type) { /** * {@link Delegate} for {@link Class} types. */ - private class ClassDelegate implements Delegate { + private static class ClassDelegate implements Delegate { @Override @Nullable @@ -229,7 +229,7 @@ public CodeBlock generateCode(Object value, ResolvableType type) { /** * {@link Delegate} for {@link ResolvableType} types. */ - private class ResolvableTypeDelegate implements Delegate { + private static class ResolvableTypeDelegate implements Delegate { @Override @Nullable @@ -512,7 +512,7 @@ private CodeBlock generateLinkedHashMapCode(Map map, /** * {@link Delegate} for {@link BeanReference} types. */ - private class BeanReferenceDelegate implements Delegate { + private static class BeanReferenceDelegate implements Delegate { @Override @Nullable diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java index e883195a886f..aa8b9e51c809 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java @@ -509,7 +509,7 @@ public Object postProcessBeforeInitialization(Object bean, String beanName) { } - private class AotContribution implements BeanFactoryInitializationAotContribution { + private static class AotContribution implements BeanFactoryInitializationAotContribution { private static final String BEAN_FACTORY_VARIABLE = BeanFactoryInitializationCode.BEAN_FACTORY_VARIABLE; diff --git a/spring-web/src/main/java/org/springframework/http/server/reactive/UndertowHttpHandlerAdapter.java b/spring-web/src/main/java/org/springframework/http/server/reactive/UndertowHttpHandlerAdapter.java index 3364a95493db..09037ecc158c 100644 --- a/spring-web/src/main/java/org/springframework/http/server/reactive/UndertowHttpHandlerAdapter.java +++ b/spring-web/src/main/java/org/springframework/http/server/reactive/UndertowHttpHandlerAdapter.java @@ -88,7 +88,7 @@ public void handleRequest(HttpServerExchange exchange) { } - private class HandlerResultSubscriber implements Subscriber { + private static class HandlerResultSubscriber implements Subscriber { private final HttpServerExchange exchange; diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java index d923e96024c8..10ead4bcfbef 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java @@ -236,7 +236,7 @@ protected VersionStrategy getStrategyForPath(String requestPath) { } - private class FileNameVersionedResource extends AbstractResource implements HttpResource { + private static class FileNameVersionedResource extends AbstractResource implements HttpResource { private final Resource original; diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/UndertowRequestUpgradeStrategy.java b/spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/UndertowRequestUpgradeStrategy.java index 973bbf4fb2e9..4a0e26589fc8 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/UndertowRequestUpgradeStrategy.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/UndertowRequestUpgradeStrategy.java @@ -82,7 +82,7 @@ public Mono upgrade(ServerWebExchange exchange, WebSocketHandler handler, } - private class DefaultCallback implements WebSocketConnectionCallback { + private static class DefaultCallback implements WebSocketConnectionCallback { private final HandshakeInfo handshakeInfo; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionResourceResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionResourceResolver.java index f2469483abc3..91ca7e77b9ef 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionResourceResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionResourceResolver.java @@ -232,7 +232,7 @@ protected VersionStrategy getStrategyForPath(String requestPath) { } - private class FileNameVersionedResource extends AbstractResource implements HttpResource { + private static class FileNameVersionedResource extends AbstractResource implements HttpResource { private final Resource original; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/XhrStreamingTransportHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/XhrStreamingTransportHandler.java index f947643205ce..08682e3c4871 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/XhrStreamingTransportHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/XhrStreamingTransportHandler.java @@ -75,7 +75,7 @@ protected SockJsFrameFormat getFrameFormat(ServerHttpRequest request) { } - private class XhrStreamingSockJsSession extends StreamingSockJsSession { + private static class XhrStreamingSockJsSession extends StreamingSockJsSession { public XhrStreamingSockJsSession(String sessionId, SockJsServiceConfig config, WebSocketHandler wsHandler, Map attributes) {