Skip to content

Commit 483985b

Browse files
committedJan 9, 2025
Suppress serialization warnings
This commit suppresses serialization warnings triggered by the upgrade of javac from 17 to 23. See spring-projectsgh-34220
1 parent b85a76f commit 483985b

File tree

5 files changed

+17
-2
lines changed

5 files changed

+17
-2
lines changed
 

‎spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java

+5
Original file line numberDiff line numberDiff line change
@@ -79,24 +79,28 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
7979

8080

8181
/** Package-protected to allow direct access for efficiency. */
82+
@SuppressWarnings("serial")
8283
TargetSource targetSource = EMPTY_TARGET_SOURCE;
8384

8485
/** Whether the Advisors are already filtered for the specific target class. */
8586
private boolean preFiltered = false;
8687

8788
/** The AdvisorChainFactory to use. */
89+
@SuppressWarnings("serial")
8890
private AdvisorChainFactory advisorChainFactory = DefaultAdvisorChainFactory.INSTANCE;
8991

9092
/**
9193
* Interfaces to be implemented by the proxy. Held in List to keep the order
9294
* of registration, to create JDK proxy with specified order of interfaces.
9395
*/
96+
@SuppressWarnings("serial")
9497
private List<Class<?>> interfaces = new ArrayList<>();
9598

9699
/**
97100
* List of Advisors. If an Advice is added, it will be wrapped
98101
* in an Advisor before being added to this List.
99102
*/
103+
@SuppressWarnings("serial")
100104
private List<Advisor> advisors = new ArrayList<>();
101105

102106
/**
@@ -105,6 +109,7 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
105109
* @since 6.0.10
106110
* @see #reduceToAdvisorKey
107111
*/
112+
@SuppressWarnings("serial")
108113
private List<Advisor> advisorKey = this.advisors;
109114

110115
/** Cache with Method as key and advisor chain List as value. */

‎spring-aop/src/main/java/org/springframework/aop/target/AbstractBeanFactoryBasedTargetSource.java

+2-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.
@@ -69,6 +69,7 @@ public abstract class AbstractBeanFactoryBasedTargetSource implements TargetSour
6969
* BeanFactory that owns this TargetSource. We need to hold onto this
7070
* reference so that we can create new prototype instances as necessary.
7171
*/
72+
@SuppressWarnings("serial")
7273
private @Nullable BeanFactory beanFactory;
7374

7475

‎spring-core/src/main/java/org/springframework/util/MimeType.java

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ public class MimeType implements Comparable<MimeType>, Serializable {
101101

102102
private final String subtype;
103103

104+
@SuppressWarnings("serial")
104105
private final Map<String, String> parameters;
105106

106107
private transient @Nullable Charset resolvedCharset;

‎spring-core/src/main/java/org/springframework/util/UnmodifiableMultiValueMap.java

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ final class UnmodifiableMultiValueMap<K,V> implements MultiValueMap<K,V>, Serial
4747

4848
private static final long serialVersionUID = -8697084563854098920L;
4949

50+
@SuppressWarnings("serial")
5051
private final MultiValueMap<K, V> delegate;
5152

5253
private transient @Nullable Set<K> keySet;
@@ -264,6 +265,7 @@ private static class UnmodifiableEntrySet<K,V> implements Set<Map.Entry<K, List<
264265

265266
private static final long serialVersionUID = 2407578793783925203L;
266267

268+
@SuppressWarnings("serial")
267269
private final Set<Entry<K, List<V>>> delegate;
268270

269271
@SuppressWarnings("unchecked")
@@ -512,6 +514,7 @@ private static class UnmodifiableValueCollection<V> implements Collection<List<V
512514

513515
private static final long serialVersionUID = 5518377583904339588L;
514516

517+
@SuppressWarnings("serial")
515518
private final Collection<List<V>> delegate;
516519

517520
public UnmodifiableValueCollection(Collection<List<V>> delegate) {

‎spring-test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java

+6-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.
@@ -89,20 +89,25 @@ public class MergedContextConfiguration implements Serializable {
8989

9090
private final Class<?>[] classes;
9191

92+
@SuppressWarnings("serial")
9293
private final Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses;
9394

9495
private final String[] activeProfiles;
9596

97+
@SuppressWarnings("serial")
9698
private final List<PropertySourceDescriptor> propertySourceDescriptors;
9799

98100
private final String[] propertySourceLocations;
99101

100102
private final String[] propertySourceProperties;
101103

104+
@SuppressWarnings("serial")
102105
private final Set<ContextCustomizer> contextCustomizers;
103106

107+
@SuppressWarnings("serial")
104108
private final ContextLoader contextLoader;
105109

110+
@SuppressWarnings("serial")
106111
private final @Nullable CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate;
107112

108113
private final @Nullable MergedContextConfiguration parent;

0 commit comments

Comments
 (0)
Please sign in to comment.