From 8bc3e662f3f249f0f5c3e9d71a7decc1c725c3c5 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Thu, 24 Apr 2025 14:26:20 +0200 Subject: [PATCH] Pull #34814: apply RemoveUnusedPrivateFields Signed-off-by: Vincent Potucek --- .../org/springframework/core/BridgeMethodResolverTests.java | 2 -- .../expression/spel/testresources/Inventor.java | 1 - .../org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java | 4 ---- .../web/servlet/resource/ResourceHttpRequestHandler.java | 3 --- 4 files changed, 10 deletions(-) diff --git a/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java b/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java index 6f909c9fea47..64f3aac69ddb 100644 --- a/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java +++ b/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java @@ -802,8 +802,6 @@ public static class GenericBroadcasterImpl implements Broadcaster { public abstract static class GenericEventBroadcasterImpl extends GenericBroadcasterImpl implements EventBroadcaster { - private Class[] subscribingEvents; - private Channel channel; /** diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Inventor.java b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Inventor.java index 37c454d02bad..cffdc6084414 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Inventor.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Inventor.java @@ -37,7 +37,6 @@ public class Inventor { public String publicName; private PlaceOfBirth placeOfBirth; private Date birthdate; - private int sinNumber; private String nationality; private String[] inventions; public String randomField; diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java index 5be207251ccf..e341a666f92f 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java @@ -377,15 +377,11 @@ public jakarta.xml.bind.Unmarshaller createUnmarshaller() { @XmlRootElement @SuppressWarnings("unused") public static class DummyRootElement { - - private DummyType t = new DummyType(); } @XmlType @SuppressWarnings("unused") public static class DummyType { - - private String s = "Hello"; } @SuppressWarnings("unused") diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java index bb971e13f1a7..fb7c6c50f45c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java @@ -53,7 +53,6 @@ import org.springframework.util.StringUtils; import org.springframework.util.StringValueResolver; import org.springframework.web.HttpRequestHandler; -import org.springframework.web.accept.ContentNegotiationManager; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.context.support.ServletContextResource; import org.springframework.web.cors.CorsConfiguration; @@ -123,8 +122,6 @@ public class ResourceHttpRequestHandler extends WebContentGenerator private @Nullable ResourceRegionHttpMessageConverter resourceRegionHttpMessageConverter; - private @Nullable ContentNegotiationManager contentNegotiationManager; - private final Map mediaTypes = new HashMap<>(4); private @Nullable CorsConfiguration corsConfiguration;