From b5eb4fcc8d325810297f10c595961d4eee528ae0 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Wed, 11 Oct 2017 16:34:10 -0600 Subject: [PATCH] Revert "Use final for params." This reverts commit cefe846e3e4a239dd568623346160ad41d7256ab. --- .../commons/collections4/CollectionUtils.java | 10 ++-- .../commons/collections4/IterableUtils.java | 4 +- .../commons/collections4/IteratorUtils.java | 6 +-- .../commons/collections4/ListUtils.java | 2 +- .../apache/commons/collections4/MapUtils.java | 2 +- .../apache/commons/collections4/SetUtils.java | 12 ++--- .../keyvalue/AbstractKeyValue.java | 4 +- .../map/AbstractReferenceMap.java | 2 +- .../collections4/map/MultiValueMap.java | 6 +-- .../multimap/AbstractListValuedMap.java | 28 +++++----- .../multimap/AbstractMultiValuedMap.java | 52 +++++++++---------- .../AbstractMultiValuedMapDecorator.java | 8 +-- .../multimap/AbstractSetValuedMap.java | 6 +-- .../multimap/ArrayListValuedHashMap.java | 8 +-- .../multimap/HashSetValuedHashMap.java | 8 +-- .../multimap/UnmodifiableMultiValuedMap.java | 2 +- .../multiset/AbstractMapMultiSet.java | 2 +- .../multiset/AbstractMultiSet.java | 4 +- .../multiset/AbstractMultiSetDecorator.java | 2 +- .../multiset/PredicatedMultiSet.java | 2 +- .../multiset/SynchronizedMultiSet.java | 2 +- .../multiset/UnmodifiableMultiSet.java | 2 +- .../collections4/queue/CircularFifoQueue.java | 2 +- .../set/AbstractNavigableSetDecorator.java | 14 ++--- .../set/PredicatedNavigableSet.java | 14 ++--- .../set/TransformedNavigableSet.java | 14 ++--- .../set/UnmodifiableNavigableSet.java | 6 +-- .../collections4/trie/UnmodifiableTrie.java | 4 +- .../collections4/CollectionUtilsTest.java | 16 +++--- .../collections4/FluentIterableTest.java | 6 +-- .../collections4/IterableUtilsTest.java | 24 ++++----- .../commons/collections4/MapUtilsTest.java | 6 +-- .../collections4/TransformerUtilsTest.java | 2 +- .../commons/collections4/bag/TreeBagTest.java | 2 +- .../PredicatedCollectionBuilderTest.java | 2 +- .../iterators/PeekingIteratorTest.java | 2 +- .../iterators/PushbackIteratorTest.java | 2 +- .../collections4/keyvalue/MultiKeyTest.java | 2 +- .../collections4/map/MultiValueMapTest.java | 4 +- .../map/PassiveExpiringMapTest.java | 2 +- .../multimap/AbstractMultiValuedMapTest.java | 6 +-- .../multimap/ArrayListValuedHashMapTest.java | 2 +- .../multimap/HashSetValuedHashMapTest.java | 2 +- .../TransformedMultiValuedMapTest.java | 2 +- .../UnmodifiableMultiValuedMapTest.java | 2 +- 45 files changed, 156 insertions(+), 156 deletions(-) diff --git a/src/main/java/org/apache/commons/collections4/CollectionUtils.java b/src/main/java/org/apache/commons/collections4/CollectionUtils.java index 1b54be593..5b974cbcb 100644 --- a/src/main/java/org/apache/commons/collections4/CollectionUtils.java +++ b/src/main/java/org/apache/commons/collections4/CollectionUtils.java @@ -923,7 +923,7 @@ public class CollectionUtils { * @since 4.1 */ public static > R select(final Iterable inputCollection, - final Predicate predicate, final R outputCollection, final R rejectedCollection) { + final Predicate predicate, R outputCollection, R rejectedCollection) { if (inputCollection != null && predicate != null) { for (final O element : inputCollection) { @@ -1506,8 +1506,8 @@ public class CollectionUtils { * @throws NullPointerException if either collection is null * @since 4.0 */ - public static > List collate(final Iterable a, - final Iterable b) { + public static > List collate(Iterable a, + Iterable b) { return collate(a, b, ComparatorUtils.naturalComparator(), true); } @@ -1688,7 +1688,7 @@ public class CollectionUtils { final Transformer> transformer = new Transformer>() { @Override - public EquatorWrapper transform(final E input) { + public EquatorWrapper transform(E input) { return new EquatorWrapper<>(equator, input); } }; @@ -1764,7 +1764,7 @@ public class CollectionUtils { final Transformer> transformer = new Transformer>() { @Override - public EquatorWrapper transform(final E input) { + public EquatorWrapper transform(E input) { return new EquatorWrapper<>(equator, input); } }; diff --git a/src/main/java/org/apache/commons/collections4/IterableUtils.java b/src/main/java/org/apache/commons/collections4/IterableUtils.java index 15e50c244..ad24eeb6a 100644 --- a/src/main/java/org/apache/commons/collections4/IterableUtils.java +++ b/src/main/java/org/apache/commons/collections4/IterableUtils.java @@ -172,7 +172,7 @@ public class IterableUtils { public Iterator iterator() { return new LazyIteratorChain() { @Override - protected Iterator nextIterator(final int count) { + protected Iterator nextIterator(int count) { if (count > iterables.length) { return null; } else { @@ -325,7 +325,7 @@ public class IterableUtils { public Iterator iterator() { return new LazyIteratorChain() { @Override - protected Iterator nextIterator(final int count) { + protected Iterator nextIterator(int count) { if (IterableUtils.isEmpty(iterable)) { return null; } else { diff --git a/src/main/java/org/apache/commons/collections4/IteratorUtils.java b/src/main/java/org/apache/commons/collections4/IteratorUtils.java index e4b30d39e..cfce5b3b6 100644 --- a/src/main/java/org/apache/commons/collections4/IteratorUtils.java +++ b/src/main/java/org/apache/commons/collections4/IteratorUtils.java @@ -433,7 +433,7 @@ public class IteratorUtils { * @throws IllegalArgumentException if max is negative * @since 4.1 */ - public static BoundedIterator boundedIterator(final Iterator iterator, final long max) { + public static BoundedIterator boundedIterator(final Iterator iterator, long max) { return boundedIterator(iterator, 0, max); } @@ -455,7 +455,7 @@ public class IteratorUtils { * @since 4.1 */ public static BoundedIterator boundedIterator(final Iterator iterator, - final long offset, final long max) { + long offset, long max) { return new BoundedIterator<>(iterator, offset, max); } @@ -890,7 +890,7 @@ public class IteratorUtils { * @throws IllegalArgumentException if offset is negative * @since 4.1 */ - public static SkippingIterator skippingIterator(final Iterator iterator, final long offset) { + public static SkippingIterator skippingIterator(final Iterator iterator, long offset) { return new SkippingIterator<>(iterator, offset); } diff --git a/src/main/java/org/apache/commons/collections4/ListUtils.java b/src/main/java/org/apache/commons/collections4/ListUtils.java index c5fe81340..38e2e8b98 100644 --- a/src/main/java/org/apache/commons/collections4/ListUtils.java +++ b/src/main/java/org/apache/commons/collections4/ListUtils.java @@ -613,7 +613,7 @@ public class ListUtils { } @Override - public Character get( final int index ) { + public Character get( int index ) { return Character.valueOf(sequence.charAt( index )); } diff --git a/src/main/java/org/apache/commons/collections4/MapUtils.java b/src/main/java/org/apache/commons/collections4/MapUtils.java index 30a084efb..15dfe826c 100644 --- a/src/main/java/org/apache/commons/collections4/MapUtils.java +++ b/src/main/java/org/apache/commons/collections4/MapUtils.java @@ -1798,7 +1798,7 @@ public class MapUtils { * @param map a Map or null * @return the given map size or 0 if the map is null */ - public static int size(final Map map) { + public static int size(Map map) { return map == null ? 0 : map.size(); } diff --git a/src/main/java/org/apache/commons/collections4/SetUtils.java b/src/main/java/org/apache/commons/collections4/SetUtils.java index 3d24cb271..e97b9c66c 100644 --- a/src/main/java/org/apache/commons/collections4/SetUtils.java +++ b/src/main/java/org/apache/commons/collections4/SetUtils.java @@ -446,7 +446,7 @@ public class SetUtils { return new SetView() { @Override - public boolean contains(final Object o) { + public boolean contains(Object o) { return a.contains(o) || b.contains(o); } @@ -488,14 +488,14 @@ public class SetUtils { final Predicate notContainedInB = new Predicate() { @Override - public boolean evaluate(final E object) { + public boolean evaluate(E object) { return !b.contains(object); } }; return new SetView() { @Override - public boolean contains(final Object o) { + public boolean contains(Object o) { return a.contains(o) && !b.contains(o); } @@ -526,14 +526,14 @@ public class SetUtils { final Predicate containedInB = new Predicate() { @Override - public boolean evaluate(final E object) { + public boolean evaluate(E object) { return b.contains(object); } }; return new SetView() { @Override - public boolean contains(final Object o) { + public boolean contains(Object o) { return a.contains(o) && b.contains(o); } @@ -570,7 +570,7 @@ public class SetUtils { return new SetView() { @Override - public boolean contains(final Object o) { + public boolean contains(Object o) { return a.contains(o) ^ b.contains(o); } diff --git a/src/main/java/org/apache/commons/collections4/keyvalue/AbstractKeyValue.java b/src/main/java/org/apache/commons/collections4/keyvalue/AbstractKeyValue.java index 6f7a5e13a..f8165613c 100644 --- a/src/main/java/org/apache/commons/collections4/keyvalue/AbstractKeyValue.java +++ b/src/main/java/org/apache/commons/collections4/keyvalue/AbstractKeyValue.java @@ -53,7 +53,7 @@ public abstract class AbstractKeyValue implements KeyValue { return key; } - protected K setKey(final K key) { + protected K setKey(K key) { final K old = this.key; this.key = key; return old; @@ -69,7 +69,7 @@ public abstract class AbstractKeyValue implements KeyValue { return value; } - protected V setValue(final V value) { + protected V setValue(V value) { final V old = this.value; this.value = value; return old; diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java index 17fd4cbe1..82ac7e3cd 100644 --- a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java +++ b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java @@ -1059,7 +1059,7 @@ public abstract class AbstractReferenceMap extends AbstractHashedMap * @param type the type to check against. * @return true if keyType has the specified type */ - protected boolean isKeyType(final ReferenceStrength type) { + protected boolean isKeyType(ReferenceStrength type) { return this.keyType == type; } } diff --git a/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java b/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java index 98e45dae4..a9290065c 100644 --- a/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java +++ b/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java @@ -427,7 +427,7 @@ public class MultiValueMap extends AbstractMapDecorator impleme return new LazyIteratorChain>() { @Override - protected Iterator> nextIterator(final int count) { + protected Iterator> nextIterator(int count) { if ( ! keyIterator.hasNext() ) { return null; } @@ -445,7 +445,7 @@ public class MultiValueMap extends AbstractMapDecorator impleme return input; } @Override - public V setValue(final V value) { + public V setValue(V value) { throw new UnsupportedOperationException(); } }; @@ -564,7 +564,7 @@ public class MultiValueMap extends AbstractMapDecorator impleme } } - private void readObject(final ObjectInputStream is) throws IOException, ClassNotFoundException { + private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException { is.defaultReadObject(); // ensure that the de-serialized class is a Collection, COLLECTIONS-580 if (clazz != null && !Collection.class.isAssignableFrom(clazz)) { diff --git a/src/main/java/org/apache/commons/collections4/multimap/AbstractListValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/AbstractListValuedMap.java index ffe6978b2..8904f6c18 100644 --- a/src/main/java/org/apache/commons/collections4/multimap/AbstractListValuedMap.java +++ b/src/main/java/org/apache/commons/collections4/multimap/AbstractListValuedMap.java @@ -96,7 +96,7 @@ public abstract class AbstractListValuedMap extends AbstractMultiValuedMap * unmodifiable list for no mapping found. */ @Override - public List remove(final Object key) { + public List remove(Object key) { return ListUtils.emptyIfNull(getMap().remove(key)); } @@ -116,7 +116,7 @@ public abstract class AbstractListValuedMap extends AbstractMultiValuedMap } @Override - public void add(final int index, final V value) { + public void add(int index, V value) { List list = getMapping(); if (list == null) { list = createCollection(); @@ -126,7 +126,7 @@ public abstract class AbstractListValuedMap extends AbstractMultiValuedMap } @Override - public boolean addAll(final int index, final Collection c) { + public boolean addAll(int index, Collection c) { List list = getMapping(); if (list == null) { list = createCollection(); @@ -140,19 +140,19 @@ public abstract class AbstractListValuedMap extends AbstractMultiValuedMap } @Override - public V get(final int index) { + public V get(int index) { final List list = ListUtils.emptyIfNull(getMapping()); return list.get(index); } @Override - public int indexOf(final Object o) { + public int indexOf(Object o) { final List list = ListUtils.emptyIfNull(getMapping()); return list.indexOf(o); } @Override - public int lastIndexOf(final Object o) { + public int lastIndexOf(Object o) { final List list = ListUtils.emptyIfNull(getMapping()); return list.lastIndexOf(o); } @@ -163,12 +163,12 @@ public abstract class AbstractListValuedMap extends AbstractMultiValuedMap } @Override - public ListIterator listIterator(final int index) { + public ListIterator listIterator(int index) { return new ValuesListIterator(key, index); } @Override - public V remove(final int index) { + public V remove(int index) { final List list = ListUtils.emptyIfNull(getMapping()); V value = list.remove(index); if (list.isEmpty()) { @@ -178,19 +178,19 @@ public abstract class AbstractListValuedMap extends AbstractMultiValuedMap } @Override - public V set(final int index, final V value) { + public V set(int index, V value) { final List list = ListUtils.emptyIfNull(getMapping()); return list.set(index, value); } @Override - public List subList(final int fromIndex, final int toIndex) { + public List subList(int fromIndex, int toIndex) { final List list = ListUtils.emptyIfNull(getMapping()); return list.subList(fromIndex, toIndex); } @Override - public boolean equals(final Object other) { + public boolean equals(Object other) { final List list = getMapping(); if (list == null) { return Collections.emptyList().equals(other); @@ -223,14 +223,14 @@ public abstract class AbstractListValuedMap extends AbstractMultiValuedMap this.iterator = values.listIterator(); } - public ValuesListIterator(final K key, final int index) { + public ValuesListIterator(final K key, int index) { this.key = key; this.values = ListUtils.emptyIfNull(getMap().get(key)); this.iterator = values.listIterator(index); } @Override - public void add(final V value) { + public void add(V value) { if (getMap().get(key) == null) { List list = createCollection(); getMap().put(key, list); @@ -279,7 +279,7 @@ public abstract class AbstractListValuedMap extends AbstractMultiValuedMap } @Override - public void set(final V value) { + public void set(V value) { iterator.set(value); } diff --git a/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java index 892718549..620667b59 100644 --- a/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java +++ b/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java @@ -109,7 +109,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap> map) { + protected void setMap(Map> map) { this.map = (Map>) map; } @@ -117,7 +117,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap implements MultiValuedMap coll = getMap().get(key); return coll != null && coll.contains(value); } @@ -163,7 +163,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap remove(final Object key) { + public Collection remove(Object key) { return CollectionUtils.emptyIfNull(getMap().remove(key)); } @@ -370,7 +370,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap implements MultiValuedMap coll = getMapping(); if (coll == null) { coll = createCollection(); @@ -425,7 +425,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap other) { + public boolean addAll(Collection other) { Collection coll = getMapping(); if (coll == null) { coll = createCollection(); @@ -460,13 +460,13 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap coll = getMapping(); return coll == null ? false : coll.contains(obj); } @Override - public boolean containsAll(final Collection other) { + public boolean containsAll(Collection other) { final Collection coll = getMapping(); return coll == null ? false : coll.containsAll(other); } @@ -478,7 +478,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap coll = getMapping(); if (coll == null) { return false; @@ -492,7 +492,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap c) { + public boolean removeAll(Collection c) { final Collection coll = getMapping(); if (coll == null) { return false; @@ -506,7 +506,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap c) { + public boolean retainAll(Collection c) { final Collection coll = getMapping(); if (coll == null) { return false; @@ -530,7 +530,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap T[] toArray(final T[] a) { + public T[] toArray(T[] a) { final Collection coll = getMapping(); if (coll == null) { return (T[]) CollectionUtils.EMPTY_COLLECTION.toArray(a); @@ -555,7 +555,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap { @Override - public boolean contains(final Object o) { + public boolean contains(Object o) { return getMap().containsKey(o); } @@ -575,7 +575,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap col = AbstractMultiValuedMap.this.getMap().get(object); if (col != null) { @@ -622,7 +622,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap keyIterator = keysCol.iterator(); @Override - protected Iterator> nextIterator(final int count) { + protected Iterator> nextIterator(int count) { if (!keyIterator.hasNext()) { return null; } @@ -652,12 +652,12 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap { - public MultiValuedMapEntry(final K key, final V value) { + public MultiValuedMapEntry(K key, V value) { super(key, value); } @Override - public V setValue(final V value) { + public V setValue(V value) { throw new UnsupportedOperationException(); } @@ -709,7 +709,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap implements MultiValuedMap get(final Object key) { + public Collection get(Object key) { Collection collection = decoratedMap.get(key); if (collection == null) { return null; @@ -817,7 +817,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap remove(final Object key) { + public Collection remove(Object key) { Collection collection = decoratedMap.remove(key); if (collection == null) { return null; @@ -830,7 +830,7 @@ public abstract class AbstractMultiValuedMap implements MultiValuedMap implements MultiValuedMap implements MultiValuedMap>> { - AsMapEntrySetIterator(final Iterator>> iterator) { + AsMapEntrySetIterator(Iterator>> iterator) { super(iterator); } diff --git a/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapDecorator.java b/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapDecorator.java index 8a6ff63f7..d49e7a019 100644 --- a/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapDecorator.java +++ b/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapDecorator.java @@ -117,7 +117,7 @@ public abstract class AbstractMultiValuedMapDecorator } @Override - public boolean put(final K key, final V value) { + public boolean put(K key, V value) { return decorated().put(key, value); } @@ -147,17 +147,17 @@ public abstract class AbstractMultiValuedMapDecorator } @Override - public boolean putAll(final K key, final Iterable values) { + public boolean putAll(K key, Iterable values) { return decorated().putAll(key, values); } @Override - public boolean putAll(final Map map) { + public boolean putAll(Map map) { return decorated().putAll(map); } @Override - public boolean putAll(final MultiValuedMap map) { + public boolean putAll(MultiValuedMap map) { return decorated().putAll(map); } diff --git a/src/main/java/org/apache/commons/collections4/multimap/AbstractSetValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/AbstractSetValuedMap.java index 88704f616..96c314070 100644 --- a/src/main/java/org/apache/commons/collections4/multimap/AbstractSetValuedMap.java +++ b/src/main/java/org/apache/commons/collections4/multimap/AbstractSetValuedMap.java @@ -48,7 +48,7 @@ public abstract class AbstractSetValuedMap extends AbstractMultiValuedMap< * @param map the map to wrap, must not be null * @throws NullPointerException if the map is null */ - protected AbstractSetValuedMap(final Map> map) { + protected AbstractSetValuedMap(Map> map) { super(map); } @@ -95,7 +95,7 @@ public abstract class AbstractSetValuedMap extends AbstractMultiValuedMap< * unmodifiable set for no mapping found. */ @Override - public Set remove(final Object key) { + public Set remove(Object key) { return SetUtils.emptyIfNull(getMap().remove(key)); } @@ -111,7 +111,7 @@ public abstract class AbstractSetValuedMap extends AbstractMultiValuedMap< } @Override - public boolean equals(final Object other) { + public boolean equals(Object other) { final Set set = (Set) getMapping(); if (set == null) { return Collections.emptySet().equals(other); diff --git a/src/main/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMap.java b/src/main/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMap.java index 74255e301..873dccffa 100644 --- a/src/main/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMap.java +++ b/src/main/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMap.java @@ -74,7 +74,7 @@ public class ArrayListValuedHashMap extends AbstractListValuedMap * * @param initialListCapacity the initial capacity used for value collections */ - public ArrayListValuedHashMap(final int initialListCapacity) { + public ArrayListValuedHashMap(int initialListCapacity) { this(DEFAULT_INITIAL_MAP_CAPACITY, initialListCapacity); } @@ -85,7 +85,7 @@ public class ArrayListValuedHashMap extends AbstractListValuedMap * @param initialMapCapacity the initial hashmap capacity * @param initialListCapacity the initial capacity used for value collections */ - public ArrayListValuedHashMap(final int initialMapCapacity, final int initialListCapacity) { + public ArrayListValuedHashMap(int initialMapCapacity, int initialListCapacity) { super(new HashMap>(initialMapCapacity)); this.initialListCapacity = initialListCapacity; } @@ -128,12 +128,12 @@ public class ArrayListValuedHashMap extends AbstractListValuedMap } // ----------------------------------------------------------------------- - private void writeObject(final ObjectOutputStream oos) throws IOException { + private void writeObject(ObjectOutputStream oos) throws IOException { oos.defaultWriteObject(); doWriteObject(oos); } - private void readObject(final ObjectInputStream ois) throws IOException, ClassNotFoundException { + private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { ois.defaultReadObject(); setMap(new HashMap>()); doReadObject(ois); diff --git a/src/main/java/org/apache/commons/collections4/multimap/HashSetValuedHashMap.java b/src/main/java/org/apache/commons/collections4/multimap/HashSetValuedHashMap.java index 616287d17..b06ada847 100644 --- a/src/main/java/org/apache/commons/collections4/multimap/HashSetValuedHashMap.java +++ b/src/main/java/org/apache/commons/collections4/multimap/HashSetValuedHashMap.java @@ -73,7 +73,7 @@ public class HashSetValuedHashMap extends AbstractSetValuedMap * * @param initialSetCapacity the initial capacity used for value collections */ - public HashSetValuedHashMap(final int initialSetCapacity) { + public HashSetValuedHashMap(int initialSetCapacity) { this(DEFAULT_INITIAL_MAP_CAPACITY, initialSetCapacity); } @@ -84,7 +84,7 @@ public class HashSetValuedHashMap extends AbstractSetValuedMap * @param initialMapCapacity the initial hashmap capacity * @param initialSetCapacity the initial capacity used for value collections */ - public HashSetValuedHashMap(final int initialMapCapacity, final int initialSetCapacity) { + public HashSetValuedHashMap(int initialMapCapacity, int initialSetCapacity) { super(new HashMap>(initialMapCapacity)); this.initialSetCapacity = initialSetCapacity; } @@ -116,12 +116,12 @@ public class HashSetValuedHashMap extends AbstractSetValuedMap } // ----------------------------------------------------------------------- - private void writeObject(final ObjectOutputStream oos) throws IOException { + private void writeObject(ObjectOutputStream oos) throws IOException { oos.defaultWriteObject(); doWriteObject(oos); } - private void readObject(final ObjectInputStream ois) throws IOException, ClassNotFoundException { + private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { ois.defaultReadObject(); setMap(new HashMap>()); doReadObject(ois); diff --git a/src/main/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMap.java index d8932bb36..1bd629f09 100644 --- a/src/main/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMap.java +++ b/src/main/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMap.java @@ -60,7 +60,7 @@ public final class UnmodifiableMultiValuedMap */ @SuppressWarnings("unchecked") public static UnmodifiableMultiValuedMap unmodifiableMultiValuedMap( - final MultiValuedMap map) { + MultiValuedMap map) { if (map instanceof Unmodifiable) { return (UnmodifiableMultiValuedMap) map; } diff --git a/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java index f6a0cd82b..f74285440 100644 --- a/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java +++ b/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java @@ -81,7 +81,7 @@ public abstract class AbstractMapMultiSet extends AbstractMultiSet { * * @param map the map to wrap */ - protected void setMap(final Map map) { + protected void setMap(Map map) { this.map = map; } diff --git a/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java index 46624cc85..261175fd2 100644 --- a/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java +++ b/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java @@ -257,7 +257,7 @@ public abstract class AbstractMultiSet extends AbstractCollection implemen protected Iterator createUniqueSetIterator() { final Transformer, E> transformer = new Transformer, E>() { @Override - public E transform(final Entry entry) { + public E transform(Entry entry) { return entry.getElement(); } }; @@ -411,7 +411,7 @@ public abstract class AbstractMultiSet extends AbstractCollection implemen protected static abstract class AbstractEntry implements Entry { @Override - public boolean equals(final Object object) { + public boolean equals(Object object) { if (object instanceof Entry) { final Entry other = (Entry) object; final E element = this.getElement(); diff --git a/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSetDecorator.java b/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSetDecorator.java index 3e2c7246e..4c80eb555 100644 --- a/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSetDecorator.java +++ b/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSetDecorator.java @@ -79,7 +79,7 @@ public abstract class AbstractMultiSetDecorator } @Override - public int setCount(final E object, final int count) { + public int setCount(E object, int count) { return decorated().setCount(object, count); } diff --git a/src/main/java/org/apache/commons/collections4/multiset/PredicatedMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/PredicatedMultiSet.java index ff9065cd5..b5d1b7e9f 100644 --- a/src/main/java/org/apache/commons/collections4/multiset/PredicatedMultiSet.java +++ b/src/main/java/org/apache/commons/collections4/multiset/PredicatedMultiSet.java @@ -118,7 +118,7 @@ public class PredicatedMultiSet extends PredicatedCollection implements Mu } @Override - public int setCount(final E object, final int count) { + public int setCount(E object, int count) { validate(object); return decorated().setCount(object, count); } diff --git a/src/main/java/org/apache/commons/collections4/multiset/SynchronizedMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/SynchronizedMultiSet.java index 8dc48c9c5..f06972027 100644 --- a/src/main/java/org/apache/commons/collections4/multiset/SynchronizedMultiSet.java +++ b/src/main/java/org/apache/commons/collections4/multiset/SynchronizedMultiSet.java @@ -120,7 +120,7 @@ public class SynchronizedMultiSet extends SynchronizedCollection implement } @Override - public int setCount(final E object, final int count) { + public int setCount(E object, int count) { synchronized (lock) { return decorated().setCount(object, count); } diff --git a/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java index 3653716ba..ddfadc058 100644 --- a/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java +++ b/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java @@ -136,7 +136,7 @@ public final class UnmodifiableMultiSet //----------------------------------------------------------------------- @Override - public int setCount(final E object, final int count) { + public int setCount(E object, int count) { throw new UnsupportedOperationException(); } diff --git a/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java b/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java index 6aada4994..8beb531ef 100644 --- a/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java +++ b/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java @@ -282,7 +282,7 @@ public class CircularFifoQueue extends AbstractCollection * @throws NullPointerException if the given element is null */ @Override - public boolean offer(final E element) { + public boolean offer(E element) { return add(element); } diff --git a/src/main/java/org/apache/commons/collections4/set/AbstractNavigableSetDecorator.java b/src/main/java/org/apache/commons/collections4/set/AbstractNavigableSetDecorator.java index 42fa4062d..01ff705a7 100644 --- a/src/main/java/org/apache/commons/collections4/set/AbstractNavigableSetDecorator.java +++ b/src/main/java/org/apache/commons/collections4/set/AbstractNavigableSetDecorator.java @@ -64,22 +64,22 @@ public abstract class AbstractNavigableSetDecorator //----------------------------------------------------------------------- @Override - public E lower(final E e) { + public E lower(E e) { return decorated().lower(e); } @Override - public E floor(final E e) { + public E floor(E e) { return decorated().floor(e); } @Override - public E ceiling(final E e) { + public E ceiling(E e) { return decorated().ceiling(e); } @Override - public E higher(final E e) { + public E higher(E e) { return decorated().higher(e); } @@ -104,17 +104,17 @@ public abstract class AbstractNavigableSetDecorator } @Override - public NavigableSet subSet(final E fromElement, final boolean fromInclusive, final E toElement, final boolean toInclusive) { + public NavigableSet subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) { return decorated().subSet(fromElement, fromInclusive, toElement, toInclusive); } @Override - public NavigableSet headSet(final E toElement, final boolean inclusive) { + public NavigableSet headSet(E toElement, boolean inclusive) { return decorated().headSet(toElement, inclusive); } @Override - public NavigableSet tailSet(final E fromElement, final boolean inclusive) { + public NavigableSet tailSet(E fromElement, boolean inclusive) { return decorated().tailSet(fromElement, inclusive); } diff --git a/src/main/java/org/apache/commons/collections4/set/PredicatedNavigableSet.java b/src/main/java/org/apache/commons/collections4/set/PredicatedNavigableSet.java index 5aea154c9..3411ceb16 100644 --- a/src/main/java/org/apache/commons/collections4/set/PredicatedNavigableSet.java +++ b/src/main/java/org/apache/commons/collections4/set/PredicatedNavigableSet.java @@ -91,22 +91,22 @@ public class PredicatedNavigableSet extends PredicatedSortedSet implements //----------------------------------------------------------------------- @Override - public E lower(final E e) { + public E lower(E e) { return decorated().lower(e); } @Override - public E floor(final E e) { + public E floor(E e) { return decorated().floor(e); } @Override - public E ceiling(final E e) { + public E ceiling(E e) { return decorated().ceiling(e); } @Override - public E higher(final E e) { + public E higher(E e) { return decorated().higher(e); } @@ -131,19 +131,19 @@ public class PredicatedNavigableSet extends PredicatedSortedSet implements } @Override - public NavigableSet subSet(final E fromElement, final boolean fromInclusive, final E toElement, final boolean toInclusive) { + public NavigableSet subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) { final NavigableSet sub = decorated().subSet(fromElement, fromInclusive, toElement, toInclusive); return predicatedNavigableSet(sub, predicate); } @Override - public NavigableSet headSet(final E toElement, final boolean inclusive) { + public NavigableSet headSet(E toElement, boolean inclusive) { final NavigableSet head = decorated().headSet(toElement, inclusive); return predicatedNavigableSet(head, predicate); } @Override - public NavigableSet tailSet(final E fromElement, final boolean inclusive) { + public NavigableSet tailSet(E fromElement, boolean inclusive) { final NavigableSet tail = decorated().tailSet(fromElement, inclusive); return predicatedNavigableSet(tail, predicate); } diff --git a/src/main/java/org/apache/commons/collections4/set/TransformedNavigableSet.java b/src/main/java/org/apache/commons/collections4/set/TransformedNavigableSet.java index c7608b1c3..eea49d75b 100644 --- a/src/main/java/org/apache/commons/collections4/set/TransformedNavigableSet.java +++ b/src/main/java/org/apache/commons/collections4/set/TransformedNavigableSet.java @@ -112,22 +112,22 @@ public class TransformedNavigableSet extends TransformedSortedSet implemen //----------------------------------------------------------------------- @Override - public E lower(final E e) { + public E lower(E e) { return decorated().lower(e); } @Override - public E floor(final E e) { + public E floor(E e) { return decorated().floor(e); } @Override - public E ceiling(final E e) { + public E ceiling(E e) { return decorated().ceiling(e); } @Override - public E higher(final E e) { + public E higher(E e) { return decorated().higher(e); } @@ -152,19 +152,19 @@ public class TransformedNavigableSet extends TransformedSortedSet implemen } @Override - public NavigableSet subSet(final E fromElement, final boolean fromInclusive, final E toElement, final boolean toInclusive) { + public NavigableSet subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) { final NavigableSet sub = decorated().subSet(fromElement, fromInclusive, toElement, toInclusive); return transformingNavigableSet(sub, transformer); } @Override - public NavigableSet headSet(final E toElement, final boolean inclusive) { + public NavigableSet headSet(E toElement, boolean inclusive) { final NavigableSet head = decorated().headSet(toElement, inclusive); return transformingNavigableSet(head, transformer); } @Override - public NavigableSet tailSet(final E fromElement, final boolean inclusive) { + public NavigableSet tailSet(E fromElement, boolean inclusive) { final NavigableSet tail = decorated().tailSet(fromElement, inclusive); return transformingNavigableSet(tail, transformer); } diff --git a/src/main/java/org/apache/commons/collections4/set/UnmodifiableNavigableSet.java b/src/main/java/org/apache/commons/collections4/set/UnmodifiableNavigableSet.java index 6767b99ae..40b4dc46f 100644 --- a/src/main/java/org/apache/commons/collections4/set/UnmodifiableNavigableSet.java +++ b/src/main/java/org/apache/commons/collections4/set/UnmodifiableNavigableSet.java @@ -136,19 +136,19 @@ public final class UnmodifiableNavigableSet } @Override - public NavigableSet subSet(final E fromElement, final boolean fromInclusive, final E toElement, final boolean toInclusive) { + public NavigableSet subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) { final NavigableSet sub = decorated().subSet(fromElement, fromInclusive, toElement, toInclusive); return unmodifiableNavigableSet(sub); } @Override - public NavigableSet headSet(final E toElement, final boolean inclusive) { + public NavigableSet headSet(E toElement, boolean inclusive) { final NavigableSet head = decorated().headSet(toElement, inclusive); return unmodifiableNavigableSet(head); } @Override - public NavigableSet tailSet(final E fromElement, final boolean inclusive) { + public NavigableSet tailSet(E fromElement, boolean inclusive) { final NavigableSet tail = decorated().tailSet(fromElement, inclusive); return unmodifiableNavigableSet(tail); } diff --git a/src/main/java/org/apache/commons/collections4/trie/UnmodifiableTrie.java b/src/main/java/org/apache/commons/collections4/trie/UnmodifiableTrie.java index 424adfa37..a18f7ef30 100644 --- a/src/main/java/org/apache/commons/collections4/trie/UnmodifiableTrie.java +++ b/src/main/java/org/apache/commons/collections4/trie/UnmodifiableTrie.java @@ -180,12 +180,12 @@ public class UnmodifiableTrie implements Trie, Serializable, Unmodif } @Override - public K nextKey(final K key) { + public K nextKey(K key) { return delegate.nextKey(key); } @Override - public K previousKey(final K key) { + public K previousKey(K key) { return delegate.previousKey(key); } diff --git a/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java b/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java index 60fc30cdc..9553610b7 100644 --- a/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java +++ b/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java @@ -702,7 +702,7 @@ public class CollectionUtilsTest extends MockTestCase { final StringBuffer result = new StringBuffer(); result.append(CollectionUtils.forAllButLastDo(strings, new Closure() { @Override - public void execute(final String input) { + public void execute(String input) { result.append(input+";"); } })); @@ -712,7 +712,7 @@ public class CollectionUtilsTest extends MockTestCase { final StringBuffer resultOne = new StringBuffer(); resultOne.append(CollectionUtils.forAllButLastDo(oneString, new Closure() { @Override - public void execute(final String input) { + public void execute(String input) { resultOne.append(input+";"); } })); @@ -1800,7 +1800,7 @@ public class CollectionUtilsTest extends MockTestCase { Predicate lessThanFive = new Predicate() { @Override - public boolean evaluate(final Integer object) { + public boolean evaluate(Integer object) { return object < 5; } }; @@ -1808,7 +1808,7 @@ public class CollectionUtilsTest extends MockTestCase { Predicate lessThanFour = new Predicate() { @Override - public boolean evaluate(final Integer object) { + public boolean evaluate(Integer object) { return object < 4; } }; @@ -1834,12 +1834,12 @@ public class CollectionUtilsTest extends MockTestCase { final Collection result = CollectionUtils.removeAll(base, remove, new Equator() { @Override - public boolean equate(final String o1, final String o2) { + public boolean equate(String o1, String o2) { return o1.charAt(1) == o2.charAt(1); } @Override - public int hash(final String o) { + public int hash(String o) { return o.charAt(1); } }); @@ -1886,12 +1886,12 @@ public class CollectionUtilsTest extends MockTestCase { final Collection result = CollectionUtils.retainAll(base, retain, new Equator() { @Override - public boolean equate(final String o1, final String o2) { + public boolean equate(String o1, String o2) { return o1.charAt(1) == o2.charAt(1); } @Override - public int hash(final String o) { + public int hash(String o) { return o.charAt(1); } }); diff --git a/src/test/java/org/apache/commons/collections4/FluentIterableTest.java b/src/test/java/org/apache/commons/collections4/FluentIterableTest.java index 8c8addc87..5b1851fc2 100644 --- a/src/test/java/org/apache/commons/collections4/FluentIterableTest.java +++ b/src/test/java/org/apache/commons/collections4/FluentIterableTest.java @@ -200,7 +200,7 @@ public class FluentIterableTest { public void filter() { Predicate smallerThan3 = new Predicate() { @Override - public boolean evaluate(final Integer object) { + public boolean evaluate(Integer object) { return object.intValue() < 3; } }; @@ -225,7 +225,7 @@ public class FluentIterableTest { final AtomicInteger sum = new AtomicInteger(0); Closure closure = new Closure() { @Override - public void execute(final Integer input) { + public void execute(Integer input) { sum.addAndGet(input); } }; @@ -317,7 +317,7 @@ public class FluentIterableTest { public void transform() { Transformer squared = new Transformer() { @Override - public Integer transform(final Integer object) { + public Integer transform(Integer object) { return object * object; } }; diff --git a/src/test/java/org/apache/commons/collections4/IterableUtilsTest.java b/src/test/java/org/apache/commons/collections4/IterableUtilsTest.java index 33f18fbdf..7fd48737d 100644 --- a/src/test/java/org/apache/commons/collections4/IterableUtilsTest.java +++ b/src/test/java/org/apache/commons/collections4/IterableUtilsTest.java @@ -184,12 +184,12 @@ public class IterableUtilsTest { final Equator secondLetterEquator = new Equator() { @Override - public boolean equate(final String o1, final String o2) { + public boolean equate(String o1, String o2) { return o1.charAt(1) == o2.charAt(1); } @Override - public int hash(final String o) { + public int hash(String o) { return o.charAt(1); } @@ -375,7 +375,7 @@ public class IterableUtilsTest { Predicate lessThanFive = new Predicate() { @Override - public boolean evaluate(final Integer object) { + public boolean evaluate(Integer object) { return object < 5; } }; @@ -383,7 +383,7 @@ public class IterableUtilsTest { Predicate lessThanFour = new Predicate() { @Override - public boolean evaluate(final Integer object) { + public boolean evaluate(Integer object) { return object < 4; } }; @@ -487,7 +487,7 @@ public class IterableUtilsTest { result = IterableUtils.toString(iterableA, new Transformer() { @Override - public String transform(final Integer input) { + public String transform(Integer input) { return new Integer(input * 2).toString(); } }); @@ -495,7 +495,7 @@ public class IterableUtilsTest { result = IterableUtils.toString(new ArrayList(), new Transformer() { @Override - public String transform(final Integer input) { + public String transform(Integer input) { fail("not supposed to reach here"); return ""; } @@ -504,7 +504,7 @@ public class IterableUtilsTest { result = IterableUtils.toString(null, new Transformer() { @Override - public String transform(final Integer input) { + public String transform(Integer input) { fail("not supposed to reach here"); return ""; } @@ -517,7 +517,7 @@ public class IterableUtilsTest { Transformer transformer = new Transformer() { @Override - public String transform(final Integer input) { + public String transform(Integer input) { return new Integer(input * 2).toString(); } }; @@ -554,7 +554,7 @@ public class IterableUtilsTest { public void testToStringWithNullArguments() { String result = IterableUtils.toString(null, new Transformer() { @Override - public String transform(final Integer input) { + public String transform(Integer input) { fail("not supposed to reach here"); return ""; } @@ -571,7 +571,7 @@ public class IterableUtilsTest { try { IterableUtils.toString(new ArrayList(), new Transformer() { @Override - public String transform(final Integer input) { + public String transform(Integer input) { fail("not supposed to reach here"); return ""; } @@ -584,7 +584,7 @@ public class IterableUtilsTest { try { IterableUtils.toString(new ArrayList(), new Transformer() { @Override - public String transform(final Integer input) { + public String transform(Integer input) { fail("not supposed to reach here"); return ""; } @@ -597,7 +597,7 @@ public class IterableUtilsTest { try { IterableUtils.toString(new ArrayList(), new Transformer() { @Override - public String transform(final Integer input) { + public String transform(Integer input) { fail("not supposed to reach here"); return ""; } diff --git a/src/test/java/org/apache/commons/collections4/MapUtilsTest.java b/src/test/java/org/apache/commons/collections4/MapUtilsTest.java index e6b9b840e..1a595a58a 100644 --- a/src/test/java/org/apache/commons/collections4/MapUtilsTest.java +++ b/src/test/java/org/apache/commons/collections4/MapUtilsTest.java @@ -824,13 +824,13 @@ public class MapUtilsTest { int key; String name; - public X(final int key, final String name) { + public X(int key, String name) { this.key = key; this.name = name; } @Override - public int compareTo(final X o) { + public int compareTo(X o) { return key - o.key | name.compareTo(o.name); } @@ -850,7 +850,7 @@ public class MapUtilsTest { final MultiValueMap map = MultiValueMap.multiValueMap(new TreeMap>()); MapUtils.populateMap(map, list, new Transformer() { @Override - public Integer transform(final X input) { + public Integer transform(X input) { return input.key; } }, TransformerUtils. nopTransformer()); diff --git a/src/test/java/org/apache/commons/collections4/TransformerUtilsTest.java b/src/test/java/org/apache/commons/collections4/TransformerUtilsTest.java index 13d881bc5..2979d90b9 100644 --- a/src/test/java/org/apache/commons/collections4/TransformerUtilsTest.java +++ b/src/test/java/org/apache/commons/collections4/TransformerUtilsTest.java @@ -249,7 +249,7 @@ public class TransformerUtilsTest { Predicate lessThanFivePredicate = new Predicate() { @Override - public boolean evaluate(final Integer value) { + public boolean evaluate(Integer value) { return value < 5; } }; diff --git a/src/test/java/org/apache/commons/collections4/bag/TreeBagTest.java b/src/test/java/org/apache/commons/collections4/bag/TreeBagTest.java index 5dc8b3d47..ad99c4453 100644 --- a/src/test/java/org/apache/commons/collections4/bag/TreeBagTest.java +++ b/src/test/java/org/apache/commons/collections4/bag/TreeBagTest.java @@ -77,7 +77,7 @@ public class TreeBagTest extends AbstractSortedBagTest { final Bag bag2 = new TreeBag<>(new Comparator() { @Override - public int compare(final String o1, final String o2) { + public int compare(String o1, String o2) { return o1.compareTo(o2); } }); diff --git a/src/test/java/org/apache/commons/collections4/collection/PredicatedCollectionBuilderTest.java b/src/test/java/org/apache/commons/collections4/collection/PredicatedCollectionBuilderTest.java index 0c8c5a803..ab2f3385f 100644 --- a/src/test/java/org/apache/commons/collections4/collection/PredicatedCollectionBuilderTest.java +++ b/src/test/java/org/apache/commons/collections4/collection/PredicatedCollectionBuilderTest.java @@ -137,7 +137,7 @@ public class PredicatedCollectionBuilderTest { private static class OddPredicate implements Predicate { @Override - public boolean evaluate(final Integer value) { + public boolean evaluate(Integer value) { return value % 2 == 1; } } diff --git a/src/test/java/org/apache/commons/collections4/iterators/PeekingIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/PeekingIteratorTest.java index 3876861cf..c3191b31a 100644 --- a/src/test/java/org/apache/commons/collections4/iterators/PeekingIteratorTest.java +++ b/src/test/java/org/apache/commons/collections4/iterators/PeekingIteratorTest.java @@ -134,7 +134,7 @@ public class PeekingIteratorTest extends AbstractIteratorTest { } } - private void validate(final Iterator iter, final E... items) { + private void validate(Iterator iter, E... items) { for (E x : items) { assertTrue(iter.hasNext()); assertEquals(x, iter.next()); diff --git a/src/test/java/org/apache/commons/collections4/iterators/PushbackIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/PushbackIteratorTest.java index 3b7a9c0e0..6561704c8 100644 --- a/src/test/java/org/apache/commons/collections4/iterators/PushbackIteratorTest.java +++ b/src/test/java/org/apache/commons/collections4/iterators/PushbackIteratorTest.java @@ -109,7 +109,7 @@ public class PushbackIteratorTest extends AbstractIteratorTest { validate(iter, "c"); } - private void validate(final Iterator iter, final Object... items) { + private void validate(Iterator iter, Object... items) { for (final Object x : items) { assertTrue(iter.hasNext()); assertEquals(x, iter.next()); diff --git a/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java b/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java index b3dc8b97a..500b837c9 100644 --- a/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java +++ b/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java @@ -258,7 +258,7 @@ public class MultiKeyTest extends TestCase { private static final long serialVersionUID = 1928896152249821416L; - public DerivedMultiKey(final T key1, final T key2) { + public DerivedMultiKey(T key1, T key2) { super(key1, key2); } diff --git a/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java b/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java index 64310d389..097ec2a1e 100644 --- a/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java +++ b/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java @@ -407,7 +407,7 @@ public class MultiValueMapTest extends AbstractObjectTest { } } - private byte[] serialize(final Object object) throws IOException { + private byte[] serialize(Object object) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); @@ -417,7 +417,7 @@ public class MultiValueMapTest extends AbstractObjectTest { return baos.toByteArray(); } - private Object deserialize(final byte[] data) throws IOException, ClassNotFoundException { + private Object deserialize(byte[] data) throws IOException, ClassNotFoundException { ByteArrayInputStream bais = new ByteArrayInputStream(data); ObjectInputStream iis = new ObjectInputStream(bais); diff --git a/src/test/java/org/apache/commons/collections4/map/PassiveExpiringMapTest.java b/src/test/java/org/apache/commons/collections4/map/PassiveExpiringMapTest.java index 8da6831ec..c633cecc0 100644 --- a/src/test/java/org/apache/commons/collections4/map/PassiveExpiringMapTest.java +++ b/src/test/java/org/apache/commons/collections4/map/PassiveExpiringMapTest.java @@ -234,7 +234,7 @@ public class PassiveExpiringMapTest extends AbstractMapTest { new PassiveExpiringMap.ConstantTimeToLiveExpirationPolicy(1, TimeUnit.SECONDS)), 1000); } - private void validateExpiration(final Map map, final long timeout) { + private void validateExpiration(final Map map, long timeout) { map.put("a", "b"); assertNotNull(map.get("a")); diff --git a/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java index 41d92f7ca..1faaaa794 100644 --- a/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java +++ b/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java @@ -57,7 +57,7 @@ public abstract class AbstractMultiValuedMapTest extends AbstractObjectTes /** MultiValuedHashMap created by reset(). */ protected MultiValuedMap confirmed; - public AbstractMultiValuedMapTest(final String testName) { + public AbstractMultiValuedMapTest(String testName) { super(testName); } @@ -146,7 +146,7 @@ public abstract class AbstractMultiValuedMapTest extends AbstractObjectTes return map; } - protected void addSampleMappings(final MultiValuedMap map) { + protected void addSampleMappings(MultiValuedMap map) { final K[] keys = getSampleKeys(); final V[] values = getSampleValues(); for (int i = 0; i < keys.length; i++) { @@ -168,7 +168,7 @@ public abstract class AbstractMultiValuedMapTest extends AbstractObjectTes return this.confirmed; } - public void setConfirmed(final MultiValuedMap map) { + public void setConfirmed(MultiValuedMap map) { this.confirmed = map; } diff --git a/src/test/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMapTest.java index 57b38f60f..286c0b351 100644 --- a/src/test/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMapTest.java +++ b/src/test/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMapTest.java @@ -32,7 +32,7 @@ import org.apache.commons.collections4.MultiValuedMap; */ public class ArrayListValuedHashMapTest extends AbstractMultiValuedMapTest { - public ArrayListValuedHashMapTest(final String testName) { + public ArrayListValuedHashMapTest(String testName) { super(testName); } diff --git a/src/test/java/org/apache/commons/collections4/multimap/HashSetValuedHashMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/HashSetValuedHashMapTest.java index 74558310f..61d553861 100644 --- a/src/test/java/org/apache/commons/collections4/multimap/HashSetValuedHashMapTest.java +++ b/src/test/java/org/apache/commons/collections4/multimap/HashSetValuedHashMapTest.java @@ -32,7 +32,7 @@ import org.apache.commons.collections4.SetValuedMap; */ public class HashSetValuedHashMapTest extends AbstractMultiValuedMapTest { - public HashSetValuedHashMapTest(final String testName) { + public HashSetValuedHashMapTest(String testName) { super(testName); } diff --git a/src/test/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMapTest.java index 0133ee0dc..5f160871d 100644 --- a/src/test/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMapTest.java +++ b/src/test/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMapTest.java @@ -33,7 +33,7 @@ import org.apache.commons.collections4.collection.TransformedCollectionTest; */ public class TransformedMultiValuedMapTest extends AbstractMultiValuedMapTest { - public TransformedMultiValuedMapTest(final String testName) { + public TransformedMultiValuedMapTest(String testName) { super(testName); } diff --git a/src/test/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMapTest.java index ad2d77607..5851ce04f 100644 --- a/src/test/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMapTest.java +++ b/src/test/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMapTest.java @@ -38,7 +38,7 @@ import org.apache.commons.collections4.Unmodifiable; */ public class UnmodifiableMultiValuedMapTest extends AbstractMultiValuedMapTest { - public UnmodifiableMultiValuedMapTest(final String testName) { + public UnmodifiableMultiValuedMapTest(String testName) { super(testName); }