Suppress serialization warnings

This commit suppresses serialization warnings triggered by the upgrade
of javac from 17 to 23.

See gh-34220
This commit is contained in:
Sébastien Deleuze 2025-01-08 18:38:48 +01:00
parent b85a76f983
commit 483985b173
5 changed files with 17 additions and 2 deletions

View File

@ -79,24 +79,28 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
/** Package-protected to allow direct access for efficiency. */
@SuppressWarnings("serial")
TargetSource targetSource = EMPTY_TARGET_SOURCE;
/** Whether the Advisors are already filtered for the specific target class. */
private boolean preFiltered = false;
/** The AdvisorChainFactory to use. */
@SuppressWarnings("serial")
private AdvisorChainFactory advisorChainFactory = DefaultAdvisorChainFactory.INSTANCE;
/**
* Interfaces to be implemented by the proxy. Held in List to keep the order
* of registration, to create JDK proxy with specified order of interfaces.
*/
@SuppressWarnings("serial")
private List<Class<?>> interfaces = new ArrayList<>();
/**
* List of Advisors. If an Advice is added, it will be wrapped
* in an Advisor before being added to this List.
*/
@SuppressWarnings("serial")
private List<Advisor> advisors = new ArrayList<>();
/**
@ -105,6 +109,7 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
* @since 6.0.10
* @see #reduceToAdvisorKey
*/
@SuppressWarnings("serial")
private List<Advisor> advisorKey = this.advisors;
/** Cache with Method as key and advisor chain List as value. */

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -69,6 +69,7 @@ public abstract class AbstractBeanFactoryBasedTargetSource implements TargetSour
* BeanFactory that owns this TargetSource. We need to hold onto this
* reference so that we can create new prototype instances as necessary.
*/
@SuppressWarnings("serial")
private @Nullable BeanFactory beanFactory;

View File

@ -101,6 +101,7 @@ public class MimeType implements Comparable<MimeType>, Serializable {
private final String subtype;
@SuppressWarnings("serial")
private final Map<String, String> parameters;
private transient @Nullable Charset resolvedCharset;

View File

@ -47,6 +47,7 @@ final class UnmodifiableMultiValueMap<K,V> implements MultiValueMap<K,V>, Serial
private static final long serialVersionUID = -8697084563854098920L;
@SuppressWarnings("serial")
private final MultiValueMap<K, V> delegate;
private transient @Nullable Set<K> keySet;
@ -264,6 +265,7 @@ final class UnmodifiableMultiValueMap<K,V> implements MultiValueMap<K,V>, Serial
private static final long serialVersionUID = 2407578793783925203L;
@SuppressWarnings("serial")
private final Set<Entry<K, List<V>>> delegate;
@SuppressWarnings("unchecked")
@ -512,6 +514,7 @@ final class UnmodifiableMultiValueMap<K,V> implements MultiValueMap<K,V>, Serial
private static final long serialVersionUID = 5518377583904339588L;
@SuppressWarnings("serial")
private final Collection<List<V>> delegate;
public UnmodifiableValueCollection(Collection<List<V>> delegate) {

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -89,20 +89,25 @@ public class MergedContextConfiguration implements Serializable {
private final Class<?>[] classes;
@SuppressWarnings("serial")
private final Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses;
private final String[] activeProfiles;
@SuppressWarnings("serial")
private final List<PropertySourceDescriptor> propertySourceDescriptors;
private final String[] propertySourceLocations;
private final String[] propertySourceProperties;
@SuppressWarnings("serial")
private final Set<ContextCustomizer> contextCustomizers;
@SuppressWarnings("serial")
private final ContextLoader contextLoader;
@SuppressWarnings("serial")
private final @Nullable CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate;
private final @Nullable MergedContextConfiguration parent;