Skip to content

Commit

Permalink
[Java] Temporarily suppress serialization warnings on collections to …
Browse files Browse the repository at this point in the history
…make the build pass on JDK 18-ea.
  • Loading branch information
vyazelenko committed Nov 17, 2021
1 parent fae0a14 commit eb93120
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*
* @param <V> type of the object stored in the map.
*/
@SuppressWarnings("serial")
public class BiInt2ObjectMap<V> implements Serializable
{
private static final long serialVersionUID = -4306301811303037776L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ public void clear()
/**
* Collection of values which supports cached iterator to avoid allocation.
*/
@SuppressWarnings("serial")
public final class ValueCollection extends AbstractCollection<V> implements Serializable
{
private static final long serialVersionUID = 4345278262685013239L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
*
* @param <V> type of values stored in the {@link java.util.Map}
*/
@SuppressWarnings("serial")
public class Int2ObjectHashMap<V>
implements Map<Integer, V>, Serializable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*
* @param <T> type of the reference.
*/
@SuppressWarnings("serial")
public class MutableReference<T> implements Serializable
{
private static final long serialVersionUID = 321431528882718691L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
*
* @param <K> type of keys stored in the {@link java.util.Map}
*/
@SuppressWarnings("serial")
public class Object2IntHashMap<K>
implements Map<K, Integer>, Serializable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
/**
* An open-addressing with linear probing hash map, same algorithm as {@link Int2IntHashMap}.
*/
@SuppressWarnings("serial")
public class Object2ObjectHashMap<K, V> implements Map<K, V>, Serializable
{
static final int MIN_CAPACITY = 8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* @see ObjectIterator
* @see Set
*/
@SuppressWarnings("serial")
public class ObjectHashSet<T> extends AbstractSet<T> implements Serializable
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public ReusableIterator iterator()
/**
* A stateful reusable iterator.
*/
@SuppressWarnings("serial")
public final class ReusableIterator implements Iterator<V>, Serializable
{
private static final long serialVersionUID = 9183617352140354854L;
Expand Down

0 comments on commit eb93120

Please sign in to comment.