Skip to content

Commit

Permalink
[Java] Remove @SuppressWarnings("serial").
Browse files Browse the repository at this point in the history
  • Loading branch information
vyazelenko committed Oct 2, 2020
1 parent c7c146c commit 6b6d988
Show file tree
Hide file tree
Showing 21 changed files with 10 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
/**
* Thrown when parsing an ASCII string and finding characters that are not digits.
*/
@SuppressWarnings("serial")
public class AsciiNumberFormatException extends NumberFormatException
{
private static final long serialVersionUID = -6849486257505869666L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
*
* @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 @@ -28,7 +28,6 @@
* A open-addressing with linear probing hash map specialised for primitive key and counter pairs. A counter map views
* counters which hit {@link #initialValue} as deleted. This means that changing a counter may impact {@link #size()}.
*/
@SuppressWarnings("serial")
public class Int2IntCounterMap implements Serializable
{
@DoNotSub private static final int MIN_CAPACITY = 8;
Expand Down
11 changes: 10 additions & 1 deletion agrona/src/main/java/org/agrona/collections/Int2IntHashMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
/**
* A open addressing with linear probing hash map specialised for primitive key and value pairs.
*/
@SuppressWarnings("serial")
public class Int2IntHashMap implements Map<Integer, Integer>, Serializable
{
@DoNotSub static final int MIN_CAPACITY = 8;
Expand Down Expand Up @@ -688,6 +687,7 @@ private Integer valOrNull(final int value)
*/
abstract class AbstractIterator implements Serializable
{
private static final long serialVersionUID = 5262459454112462433L;
/**
* Is current position valid.
*/
Expand Down Expand Up @@ -810,6 +810,8 @@ public void remove()
*/
public final class KeyIterator extends AbstractIterator implements Iterator<Integer>, Serializable
{
private static final long serialVersionUID = 9151493609653852972L;

public Integer next()
{
return nextValue();
Expand All @@ -832,6 +834,8 @@ public int nextValue()
*/
public final class ValueIterator extends AbstractIterator implements Iterator<Integer>, Serializable
{
private static final long serialVersionUID = -5670291734793552927L;

public Integer next()
{
return nextValue();
Expand All @@ -856,6 +860,8 @@ public final class EntryIterator
extends AbstractIterator
implements Iterator<Entry<Integer, Integer>>, Entry<Integer, Integer>, Serializable
{
private static final long serialVersionUID = 1744408438593481051L;

public Integer getKey()
{
return getIntKey();
Expand Down Expand Up @@ -1024,6 +1030,7 @@ public String toString()
*/
public final class KeySet extends AbstractSet<Integer> implements Serializable
{
private static final long serialVersionUID = -7645453993079742625L;
private final KeyIterator keyIterator = shouldAvoidAllocation ? new KeyIterator() : null;

/**
Expand Down Expand Up @@ -1091,6 +1098,7 @@ public boolean contains(final int key)
*/
public final class ValueCollection extends AbstractCollection<Integer> implements Serializable
{
private static final long serialVersionUID = -8925598924781601919L;
private final ValueIterator valueIterator = shouldAvoidAllocation ? new ValueIterator() : null;

/**
Expand Down Expand Up @@ -1142,6 +1150,7 @@ public boolean contains(final int value)
*/
public final class EntrySet extends AbstractSet<Map.Entry<Integer, Integer>> implements Serializable
{
private static final long serialVersionUID = 63641283589916174L;
private final EntryIterator entryIterator = shouldAvoidAllocation ? new EntryIterator() : null;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*
* @param <V> type of values stored in the {@link java.util.Map}
*/
@SuppressWarnings("serial")
public class Int2NullableObjectHashMap<V> extends Int2ObjectHashMap<V>
{
private static final long serialVersionUID = -7081946803848112161L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
*
* @param <V> type of values stored in the {@link Map}
*/
@SuppressWarnings("serial")
public class Int2ObjectCache<V>
implements Map<Integer, V>, Serializable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
*
* @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 @@ -26,7 +26,6 @@
/**
* A {@link List} implementation that stores int values with the ability to not have them boxed.
*/
@SuppressWarnings("serial")
public class IntArrayList extends AbstractList<Integer> implements List<Integer>, RandomAccess, Serializable
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
* <p>
* <b>Note:</b> This class is not threadsafe.
*/
@SuppressWarnings("serial")
public class IntArrayQueue extends AbstractQueue<Integer> implements Serializable
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
* @see IntIterator
* @see Set
*/
@SuppressWarnings("serial")
public class IntHashSet extends AbstractSet<Integer> implements Serializable
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
*
* @param <E> the type of element that this cache holds.
*/
@SuppressWarnings("serial")
public final class IntLruCache<E> implements AutoCloseable, Serializable
{
private static final long serialVersionUID = 8349342109370417432L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
/**
* Mutable boolean valid that is useful for capturing a value when using lambdas or collections.
*/
@SuppressWarnings("serial")
public class MutableBoolean implements Serializable
{
private static final long serialVersionUID = 4524695016393435450L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* Holder for an int value that is mutable. Useful for being a counter in a {@link java.util.Map} or for passing by
* reference.
*/
@SuppressWarnings("serial")
public class MutableInteger extends Number implements Comparable<MutableInteger>, Serializable
{
private static final long serialVersionUID = 985259236882848264L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* Holder for an long value that is mutable. Useful for being a counter in a {@link java.util.Map} or for passing by
* reference.
*/
@SuppressWarnings("serial")
public class MutableLong extends Number implements Comparable<MutableLong>, Serializable
{
private static final long serialVersionUID = -3537098518545563995L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*
* @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,7 +31,6 @@
*
* @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 @@ -18,7 +18,6 @@
/**
* Variation of {@link Object2ObjectHashMap} that allows {@code null} values.
*/
@SuppressWarnings("serial")
public class Object2NullableObjectHashMap<K, V> extends Object2ObjectHashMap<K, V>
{
private static final long serialVersionUID = 8456084431646897808L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
/**
* A 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,7 +35,6 @@
* @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 @@ -27,7 +27,6 @@
* @param <V> The type of the view.
* @param <E> The type of the underlying element.
*/
@SuppressWarnings("serial")
public class UnmodifiableCollectionView<V, E> extends AbstractCollection<V> implements Serializable
{
private static final long serialVersionUID = -2278582252954007865L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
* @see AgentInvoker
* @see AgentRunner
*/
@SuppressWarnings("serial")
public class AgentTerminationException extends RuntimeException
{
private static final long serialVersionUID = 5962977383701965069L;
Expand Down

0 comments on commit 6b6d988

Please sign in to comment.