mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8231202: Suppress warnings on non-serializable non-transient instance fields in serializable classes
Reviewed-by: rriggs, chegar
This commit is contained in:
parent
fbb4093562
commit
3c9b6d8554
18 changed files with 86 additions and 6 deletions
|
@ -230,6 +230,7 @@ public class Throwable implements Serializable {
|
||||||
* @serial
|
* @serial
|
||||||
* @since 1.7
|
* @since 1.7
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
private List<Throwable> suppressedExceptions = SUPPRESSED_SENTINEL;
|
private List<Throwable> suppressedExceptions = SUPPRESSED_SENTINEL;
|
||||||
|
|
||||||
/** Message for trying to suppress a null exception. */
|
/** Message for trying to suppress a null exception. */
|
||||||
|
|
|
@ -76,6 +76,7 @@ public final class SerializedLambda implements Serializable {
|
||||||
private final String implMethodSignature;
|
private final String implMethodSignature;
|
||||||
private final int implMethodKind;
|
private final int implMethodKind;
|
||||||
private final String instantiatedMethodType;
|
private final String instantiatedMethodType;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
private final Object[] capturedArgs;
|
private final Object[] capturedArgs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -308,6 +308,7 @@ public class Proxy implements java.io.Serializable {
|
||||||
* the invocation handler for this proxy instance.
|
* the invocation handler for this proxy instance.
|
||||||
* @serial
|
* @serial
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
protected InvocationHandler h;
|
protected InvocationHandler h;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -641,6 +641,7 @@ public abstract class Clock {
|
||||||
static final class OffsetClock extends Clock implements Serializable {
|
static final class OffsetClock extends Clock implements Serializable {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 2007484719125426256L;
|
private static final long serialVersionUID = 2007484719125426256L;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
private final Clock baseClock;
|
private final Clock baseClock;
|
||||||
private final Duration offset;
|
private final Duration offset;
|
||||||
|
|
||||||
|
@ -692,6 +693,7 @@ public abstract class Clock {
|
||||||
static final class TickClock extends Clock implements Serializable {
|
static final class TickClock extends Clock implements Serializable {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 6504659149906368850L;
|
private static final long serialVersionUID = 6504659149906368850L;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
private final Clock baseClock;
|
private final Clock baseClock;
|
||||||
private final long tickNanos;
|
private final long tickNanos;
|
||||||
|
|
||||||
|
|
|
@ -109,6 +109,7 @@ final class ChronoPeriodImpl
|
||||||
/**
|
/**
|
||||||
* The chronology.
|
* The chronology.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
private final Chronology chrono;
|
private final Chronology chrono;
|
||||||
/**
|
/**
|
||||||
* The number of years.
|
* The number of years.
|
||||||
|
|
|
@ -607,7 +607,9 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = -8499721149061103585L;
|
private static final long serialVersionUID = -8499721149061103585L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final K key;
|
private final K key;
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private V value;
|
private V value;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -738,7 +740,9 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 7138329143949025153L;
|
private static final long serialVersionUID = 7138329143949025153L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
private final K key;
|
private final K key;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
private final V value;
|
private final V value;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -103,10 +103,15 @@ class ArrayPrefixHelpers {
|
||||||
static final int MIN_PARTITION = 16;
|
static final int MIN_PARTITION = 16;
|
||||||
|
|
||||||
static final class CumulateTask<T> extends CountedCompleter<Void> {
|
static final class CumulateTask<T> extends CountedCompleter<Void> {
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
final T[] array;
|
final T[] array;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
final BinaryOperator<T> function;
|
final BinaryOperator<T> function;
|
||||||
CumulateTask<T> left, right;
|
CumulateTask<T> left, right;
|
||||||
T in, out;
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
|
T in;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
|
T out;
|
||||||
final int lo, hi, origin, fence, threshold;
|
final int lo, hi, origin, fence, threshold;
|
||||||
|
|
||||||
/** Root task constructor */
|
/** Root task constructor */
|
||||||
|
@ -257,6 +262,7 @@ class ArrayPrefixHelpers {
|
||||||
|
|
||||||
static final class LongCumulateTask extends CountedCompleter<Void> {
|
static final class LongCumulateTask extends CountedCompleter<Void> {
|
||||||
final long[] array;
|
final long[] array;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
final LongBinaryOperator function;
|
final LongBinaryOperator function;
|
||||||
LongCumulateTask left, right;
|
LongCumulateTask left, right;
|
||||||
long in, out;
|
long in, out;
|
||||||
|
@ -408,6 +414,7 @@ class ArrayPrefixHelpers {
|
||||||
|
|
||||||
static final class DoubleCumulateTask extends CountedCompleter<Void> {
|
static final class DoubleCumulateTask extends CountedCompleter<Void> {
|
||||||
final double[] array;
|
final double[] array;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
final DoubleBinaryOperator function;
|
final DoubleBinaryOperator function;
|
||||||
DoubleCumulateTask left, right;
|
DoubleCumulateTask left, right;
|
||||||
double in, out;
|
double in, out;
|
||||||
|
@ -559,6 +566,7 @@ class ArrayPrefixHelpers {
|
||||||
|
|
||||||
static final class IntCumulateTask extends CountedCompleter<Void> {
|
static final class IntCumulateTask extends CountedCompleter<Void> {
|
||||||
final int[] array;
|
final int[] array;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
final IntBinaryOperator function;
|
final IntBinaryOperator function;
|
||||||
IntCumulateTask left, right;
|
IntCumulateTask left, right;
|
||||||
int in, out;
|
int in, out;
|
||||||
|
|
|
@ -4339,6 +4339,7 @@ public class Arrays {
|
||||||
{
|
{
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = -2764017481108945198L;
|
private static final long serialVersionUID = -2764017481108945198L;
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final E[] a;
|
private final E[] a;
|
||||||
|
|
||||||
ArrayList(E[] array) {
|
ArrayList(E[] array) {
|
||||||
|
|
|
@ -115,8 +115,12 @@ import java.util.concurrent.CountedCompleter;
|
||||||
static final class Sorter<T> extends CountedCompleter<Void> {
|
static final class Sorter<T> extends CountedCompleter<Void> {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
static final long serialVersionUID = 2446542900576103244L;
|
static final long serialVersionUID = 2446542900576103244L;
|
||||||
final T[] a, w;
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
|
final T[] a;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
|
final T[] w;
|
||||||
final int base, size, wbase, gran;
|
final int base, size, wbase, gran;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
Comparator<? super T> comparator;
|
Comparator<? super T> comparator;
|
||||||
Sorter(CountedCompleter<?> par, T[] a, T[] w, int base, int size,
|
Sorter(CountedCompleter<?> par, T[] a, T[] w, int base, int size,
|
||||||
int wbase, int gran,
|
int wbase, int gran,
|
||||||
|
@ -153,8 +157,13 @@ import java.util.concurrent.CountedCompleter;
|
||||||
static final class Merger<T> extends CountedCompleter<Void> {
|
static final class Merger<T> extends CountedCompleter<Void> {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
static final long serialVersionUID = 2446542900576103244L;
|
static final long serialVersionUID = 2446542900576103244L;
|
||||||
final T[] a, w; // main and workspace arrays
|
// main and workspace arrays
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
|
final T[] a;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
|
final T[] w;
|
||||||
final int lbase, lsize, rbase, rsize, wbase, gran;
|
final int lbase, lsize, rbase, rsize, wbase, gran;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
Comparator<? super T> comparator;
|
Comparator<? super T> comparator;
|
||||||
Merger(CountedCompleter<?> par, T[] a, T[] w,
|
Merger(CountedCompleter<?> par, T[] a, T[] w,
|
||||||
int lbase, int lsize, int rbase,
|
int lbase, int lsize, int rbase,
|
||||||
|
|
|
@ -1024,6 +1024,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 1820017752578914078L;
|
private static final long serialVersionUID = 1820017752578914078L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final Collection<? extends E> c;
|
final Collection<? extends E> c;
|
||||||
|
|
||||||
UnmodifiableCollection(Collection<? extends E> c) {
|
UnmodifiableCollection(Collection<? extends E> c) {
|
||||||
|
@ -1164,6 +1165,7 @@ public class Collections {
|
||||||
implements SortedSet<E>, Serializable {
|
implements SortedSet<E>, Serializable {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = -4929149591599911165L;
|
private static final long serialVersionUID = -4929149591599911165L;
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final SortedSet<E> ss;
|
private final SortedSet<E> ss;
|
||||||
|
|
||||||
UnmodifiableSortedSet(SortedSet<E> s) {super(s); ss = s;}
|
UnmodifiableSortedSet(SortedSet<E> s) {super(s); ss = s;}
|
||||||
|
@ -1244,6 +1246,7 @@ public class Collections {
|
||||||
/**
|
/**
|
||||||
* The instance we are protecting.
|
* The instance we are protecting.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final NavigableSet<E> ns;
|
private final NavigableSet<E> ns;
|
||||||
|
|
||||||
UnmodifiableNavigableSet(NavigableSet<E> s) {super(s); ns = s;}
|
UnmodifiableNavigableSet(NavigableSet<E> s) {super(s); ns = s;}
|
||||||
|
@ -1304,6 +1307,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = -283967356065247728L;
|
private static final long serialVersionUID = -283967356065247728L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final List<? extends E> list;
|
final List<? extends E> list;
|
||||||
|
|
||||||
UnmodifiableList(List<? extends E> list) {
|
UnmodifiableList(List<? extends E> list) {
|
||||||
|
@ -1450,6 +1454,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = -1034234728574286014L;
|
private static final long serialVersionUID = -1034234728574286014L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final Map<? extends K, ? extends V> m;
|
private final Map<? extends K, ? extends V> m;
|
||||||
|
|
||||||
UnmodifiableMap(Map<? extends K, ? extends V> m) {
|
UnmodifiableMap(Map<? extends K, ? extends V> m) {
|
||||||
|
@ -1809,6 +1814,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = -8806743815996713206L;
|
private static final long serialVersionUID = -8806743815996713206L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final SortedMap<K, ? extends V> sm;
|
private final SortedMap<K, ? extends V> sm;
|
||||||
|
|
||||||
UnmodifiableSortedMap(SortedMap<K, ? extends V> m) {super(m); sm = m; }
|
UnmodifiableSortedMap(SortedMap<K, ? extends V> m) {super(m); sm = m; }
|
||||||
|
@ -1886,6 +1892,7 @@ public class Collections {
|
||||||
/**
|
/**
|
||||||
* The instance we wrap and protect.
|
* The instance we wrap and protect.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final NavigableMap<K, ? extends V> nm;
|
private final NavigableMap<K, ? extends V> nm;
|
||||||
|
|
||||||
UnmodifiableNavigableMap(NavigableMap<K, ? extends V> m)
|
UnmodifiableNavigableMap(NavigableMap<K, ? extends V> m)
|
||||||
|
@ -2017,7 +2024,9 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 3053995032091335093L;
|
private static final long serialVersionUID = 3053995032091335093L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final Collection<E> c; // Backing Collection
|
final Collection<E> c; // Backing Collection
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final Object mutex; // Object on which to synchronize
|
final Object mutex; // Object on which to synchronize
|
||||||
|
|
||||||
SynchronizedCollection(Collection<E> c) {
|
SynchronizedCollection(Collection<E> c) {
|
||||||
|
@ -2219,6 +2228,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 8695801310862127406L;
|
private static final long serialVersionUID = 8695801310862127406L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final SortedSet<E> ss;
|
private final SortedSet<E> ss;
|
||||||
|
|
||||||
SynchronizedSortedSet(SortedSet<E> s) {
|
SynchronizedSortedSet(SortedSet<E> s) {
|
||||||
|
@ -2314,6 +2324,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = -5505529816273629798L;
|
private static final long serialVersionUID = -5505529816273629798L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final NavigableSet<E> ns;
|
private final NavigableSet<E> ns;
|
||||||
|
|
||||||
SynchronizedNavigableSet(NavigableSet<E> s) {
|
SynchronizedNavigableSet(NavigableSet<E> s) {
|
||||||
|
@ -2424,6 +2435,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = -7754090372962971524L;
|
private static final long serialVersionUID = -7754090372962971524L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final List<E> list;
|
final List<E> list;
|
||||||
|
|
||||||
SynchronizedList(List<E> list) {
|
SynchronizedList(List<E> list) {
|
||||||
|
@ -2591,7 +2603,9 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 1978198479659022715L;
|
private static final long serialVersionUID = 1978198479659022715L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final Map<K,V> m; // Backing Map
|
private final Map<K,V> m; // Backing Map
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final Object mutex; // Object on which to synchronize
|
final Object mutex; // Object on which to synchronize
|
||||||
|
|
||||||
SynchronizedMap(Map<K,V> m) {
|
SynchronizedMap(Map<K,V> m) {
|
||||||
|
@ -2788,6 +2802,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = -8798146769416483793L;
|
private static final long serialVersionUID = -8798146769416483793L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final SortedMap<K,V> sm;
|
private final SortedMap<K,V> sm;
|
||||||
|
|
||||||
SynchronizedSortedMap(SortedMap<K,V> m) {
|
SynchronizedSortedMap(SortedMap<K,V> m) {
|
||||||
|
@ -2891,6 +2906,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 699392247599746807L;
|
private static final long serialVersionUID = 699392247599746807L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final NavigableMap<K,V> nm;
|
private final NavigableMap<K,V> nm;
|
||||||
|
|
||||||
SynchronizedNavigableMap(NavigableMap<K,V> m) {
|
SynchronizedNavigableMap(NavigableMap<K,V> m) {
|
||||||
|
@ -3070,7 +3086,9 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 1578914078182001775L;
|
private static final long serialVersionUID = 1578914078182001775L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final Collection<E> c;
|
final Collection<E> c;
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final Class<E> type;
|
final Class<E> type;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
@ -3126,6 +3144,7 @@ public class Collections {
|
||||||
|
|
||||||
public boolean add(E e) { return c.add(typeCheck(e)); }
|
public boolean add(E e) { return c.add(typeCheck(e)); }
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private E[] zeroLengthElementArray; // Lazily initialized
|
private E[] zeroLengthElementArray; // Lazily initialized
|
||||||
|
|
||||||
private E[] zeroLengthElementArray() {
|
private E[] zeroLengthElementArray() {
|
||||||
|
@ -3219,6 +3238,7 @@ public class Collections {
|
||||||
{
|
{
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 1433151992604707767L;
|
private static final long serialVersionUID = 1433151992604707767L;
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final Queue<E> queue;
|
final Queue<E> queue;
|
||||||
|
|
||||||
CheckedQueue(Queue<E> queue, Class<E> elementType) {
|
CheckedQueue(Queue<E> queue, Class<E> elementType) {
|
||||||
|
@ -3323,6 +3343,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 1599911165492914959L;
|
private static final long serialVersionUID = 1599911165492914959L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final SortedSet<E> ss;
|
private final SortedSet<E> ss;
|
||||||
|
|
||||||
CheckedSortedSet(SortedSet<E> s, Class<E> type) {
|
CheckedSortedSet(SortedSet<E> s, Class<E> type) {
|
||||||
|
@ -3387,6 +3408,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = -5429120189805438922L;
|
private static final long serialVersionUID = -5429120189805438922L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final NavigableSet<E> ns;
|
private final NavigableSet<E> ns;
|
||||||
|
|
||||||
CheckedNavigableSet(NavigableSet<E> s, Class<E> type) {
|
CheckedNavigableSet(NavigableSet<E> s, Class<E> type) {
|
||||||
|
@ -3470,6 +3492,7 @@ public class Collections {
|
||||||
{
|
{
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 65247728283967356L;
|
private static final long serialVersionUID = 65247728283967356L;
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final List<E> list;
|
final List<E> list;
|
||||||
|
|
||||||
CheckedList(List<E> list, Class<E> type) {
|
CheckedList(List<E> list, Class<E> type) {
|
||||||
|
@ -3619,8 +3642,11 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 5742860141034234728L;
|
private static final long serialVersionUID = 5742860141034234728L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final Map<K, V> m;
|
private final Map<K, V> m;
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final Class<K> keyType;
|
final Class<K> keyType;
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final Class<V> valueType;
|
final Class<V> valueType;
|
||||||
|
|
||||||
private void typeCheck(Object key, Object value) {
|
private void typeCheck(Object key, Object value) {
|
||||||
|
@ -4019,6 +4045,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 1599671320688067438L;
|
private static final long serialVersionUID = 1599671320688067438L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final SortedMap<K, V> sm;
|
private final SortedMap<K, V> sm;
|
||||||
|
|
||||||
CheckedSortedMap(SortedMap<K, V> m,
|
CheckedSortedMap(SortedMap<K, V> m,
|
||||||
|
@ -4094,6 +4121,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = -4852462692372534096L;
|
private static final long serialVersionUID = -4852462692372534096L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final NavigableMap<K, V> nm;
|
private final NavigableMap<K, V> nm;
|
||||||
|
|
||||||
CheckedNavigableMap(NavigableMap<K, V> m,
|
CheckedNavigableMap(NavigableMap<K, V> m,
|
||||||
|
@ -4825,6 +4853,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 3193687207550431679L;
|
private static final long serialVersionUID = 3193687207550431679L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final E element;
|
private final E element;
|
||||||
|
|
||||||
SingletonSet(E e) {element = e;}
|
SingletonSet(E e) {element = e;}
|
||||||
|
@ -4879,6 +4908,7 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 3093736618740652951L;
|
private static final long serialVersionUID = 3093736618740652951L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final E element;
|
private final E element;
|
||||||
|
|
||||||
SingletonList(E obj) {element = obj;}
|
SingletonList(E obj) {element = obj;}
|
||||||
|
@ -4948,7 +4978,9 @@ public class Collections {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = -6979724477215052911L;
|
private static final long serialVersionUID = -6979724477215052911L;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final K k;
|
private final K k;
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final V v;
|
private final V v;
|
||||||
|
|
||||||
SingletonMap(K key, V value) {
|
SingletonMap(K key, V value) {
|
||||||
|
@ -5087,6 +5119,7 @@ public class Collections {
|
||||||
private static final long serialVersionUID = 2739099268398711800L;
|
private static final long serialVersionUID = 2739099268398711800L;
|
||||||
|
|
||||||
final int n;
|
final int n;
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final E element;
|
final E element;
|
||||||
|
|
||||||
CopiesList(int n, E e) {
|
CopiesList(int n, E e) {
|
||||||
|
@ -5320,6 +5353,7 @@ public class Collections {
|
||||||
*
|
*
|
||||||
* @serial
|
* @serial
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
final Comparator<T> cmp;
|
final Comparator<T> cmp;
|
||||||
|
|
||||||
ReverseComparator2(Comparator<T> cmp) {
|
ReverseComparator2(Comparator<T> cmp) {
|
||||||
|
@ -5601,6 +5635,7 @@ public class Collections {
|
||||||
private static class SetFromMap<E> extends AbstractSet<E>
|
private static class SetFromMap<E> extends AbstractSet<E>
|
||||||
implements Set<E>, Serializable
|
implements Set<E>, Serializable
|
||||||
{
|
{
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final Map<E, Boolean> m; // The backing map
|
private final Map<E, Boolean> m; // The backing map
|
||||||
private transient Set<E> s; // Its keySet
|
private transient Set<E> s; // Its keySet
|
||||||
|
|
||||||
|
@ -5686,6 +5721,7 @@ public class Collections {
|
||||||
implements Queue<E>, Serializable {
|
implements Queue<E>, Serializable {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 1802017725587941708L;
|
private static final long serialVersionUID = 1802017725587941708L;
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final Deque<E> q;
|
private final Deque<E> q;
|
||||||
AsLIFOQueue(Deque<E> q) { this.q = q; }
|
AsLIFOQueue(Deque<E> q) { this.q = q; }
|
||||||
public boolean add(E e) { q.addFirst(e); return true; }
|
public boolean add(E e) { q.addFirst(e); return true; }
|
||||||
|
|
|
@ -66,6 +66,7 @@ class Comparators {
|
||||||
private static final long serialVersionUID = -7569533591570686392L;
|
private static final long serialVersionUID = -7569533591570686392L;
|
||||||
private final boolean nullFirst;
|
private final boolean nullFirst;
|
||||||
// if null, non-null Ts are considered equal
|
// if null, non-null Ts are considered equal
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
private final Comparator<T> real;
|
private final Comparator<T> real;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
|
|
@ -111,6 +111,7 @@ public class PriorityQueue<E> extends AbstractQueue<E>
|
||||||
* The comparator, or null if priority queue uses elements'
|
* The comparator, or null if priority queue uses elements'
|
||||||
* natural ordering.
|
* natural ordering.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final Comparator<? super E> comparator;
|
private final Comparator<? super E> comparator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -118,6 +118,7 @@ public class TreeMap<K,V>
|
||||||
*
|
*
|
||||||
* @serial
|
* @serial
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final Comparator<? super K> comparator;
|
private final Comparator<? super K> comparator;
|
||||||
|
|
||||||
private transient Entry<K,V> root;
|
private transient Entry<K,V> root;
|
||||||
|
@ -1353,7 +1354,10 @@ public class TreeMap<K,V>
|
||||||
* if loInclusive is true, lo is the inclusive bound, else lo
|
* if loInclusive is true, lo is the inclusive bound, else lo
|
||||||
* is the exclusive bound. Similarly for the upper bound.
|
* is the exclusive bound. Similarly for the upper bound.
|
||||||
*/
|
*/
|
||||||
final K lo, hi;
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
|
final K lo;
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
|
final K hi;
|
||||||
final boolean fromStart, toEnd;
|
final boolean fromStart, toEnd;
|
||||||
final boolean loInclusive, hiInclusive;
|
final boolean loInclusive, hiInclusive;
|
||||||
|
|
||||||
|
@ -1936,6 +1940,7 @@ public class TreeMap<K,V>
|
||||||
super(m, fromStart, lo, loInclusive, toEnd, hi, hiInclusive);
|
super(m, fromStart, lo, loInclusive, toEnd, hi, hiInclusive);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
private final Comparator<? super K> reverseComparator =
|
private final Comparator<? super K> reverseComparator =
|
||||||
Collections.reverseOrder(m.comparator);
|
Collections.reverseOrder(m.comparator);
|
||||||
|
|
||||||
|
@ -2024,7 +2029,10 @@ public class TreeMap<K,V>
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = -6520786458950516097L;
|
private static final long serialVersionUID = -6520786458950516097L;
|
||||||
private boolean fromStart = false, toEnd = false;
|
private boolean fromStart = false, toEnd = false;
|
||||||
private K fromKey, toKey;
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
|
private K fromKey;
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
|
private K toKey;
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private Object readResolve() {
|
private Object readResolve() {
|
||||||
return new AscendingSubMap<>(TreeMap.this,
|
return new AscendingSubMap<>(TreeMap.this,
|
||||||
|
|
|
@ -102,6 +102,7 @@ public class Vector<E>
|
||||||
*
|
*
|
||||||
* @serial
|
* @serial
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial") // Conditionally serializable
|
||||||
protected Object[] elementData;
|
protected Object[] elementData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -590,6 +590,7 @@ class JarVerifier {
|
||||||
URL vlocation;
|
URL vlocation;
|
||||||
CodeSigner[] vsigners;
|
CodeSigner[] vsigners;
|
||||||
java.security.cert.Certificate[] vcerts;
|
java.security.cert.Certificate[] vcerts;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
Object csdomain;
|
Object csdomain;
|
||||||
|
|
||||||
VerifierCodeSource(Object csdomain, URL location, CodeSigner[] signers) {
|
VerifierCodeSource(Object csdomain, URL location, CodeSigner[] signers) {
|
||||||
|
|
|
@ -49,6 +49,7 @@ class NegotiateAuthentication extends AuthenticationInfo {
|
||||||
private static final long serialVersionUID = 100L;
|
private static final long serialVersionUID = 100L;
|
||||||
private static final PlatformLogger logger = HttpURLConnection.getHttpLogger();
|
private static final PlatformLogger logger = HttpURLConnection.getHttpLogger();
|
||||||
|
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
private final HttpCallerInfo hci;
|
private final HttpCallerInfo hci;
|
||||||
|
|
||||||
// These maps are used to manage the GSS availability for diffrent
|
// These maps are used to manage the GSS availability for diffrent
|
||||||
|
@ -67,6 +68,7 @@ class NegotiateAuthentication extends AuthenticationInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
// The HTTP Negotiate Helper
|
// The HTTP Negotiate Helper
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
private Negotiator negotiator = null;
|
private Negotiator negotiator = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -44,6 +44,7 @@ class AnnotationInvocationHandler implements InvocationHandler, Serializable {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 6182022883658399397L;
|
private static final long serialVersionUID = 6182022883658399397L;
|
||||||
private final Class<? extends Annotation> type;
|
private final Class<? extends Annotation> type;
|
||||||
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
private final Map<String, Object> memberValues;
|
private final Map<String, Object> memberValues;
|
||||||
|
|
||||||
AnnotationInvocationHandler(Class<? extends Annotation> type, Map<String, Object> memberValues) {
|
AnnotationInvocationHandler(Class<? extends Annotation> type, Map<String, Object> memberValues) {
|
||||||
|
|
|
@ -36,7 +36,8 @@ import java.lang.reflect.Method;
|
||||||
class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy {
|
class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy {
|
||||||
@java.io.Serial
|
@java.io.Serial
|
||||||
private static final long serialVersionUID = 7844069490309503934L;
|
private static final long serialVersionUID = 7844069490309503934L;
|
||||||
private Method member;
|
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||||
|
private Method member; // Would be more robust to null-out in a writeObject method.
|
||||||
private final String foundType;
|
private final String foundType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue