From e6c2a9cc9b6b075757a8330a7a130973c364ea00 Mon Sep 17 00:00:00 2001 From: Alexander Goldberg Date: Mon, 5 Dec 2022 13:59:21 -0500 Subject: [PATCH] Turn on additional IntelliJ inspections and fix violations (Method is identical to its super method). #1323 Signed-off-by: Alexander Goldberg --- .../2_Inconsistent_Constructs.xml | 1408 ++++++++++++++++- .../bag/immutable/ImmutableSingletonBag.java | 6 - .../immutable/AbstractImmutableSortedBag.java | 15 - .../sorted/mutable/SynchronizedSortedBag.java | 7 - .../parallel/ParallelDistinctIterable.java | 7 - .../list/ParallelDistinctListIterable.java | 7 - .../impl/list/fixed/AbstractArrayAdapter.java | 7 - .../list/immutable/AbstractImmutableList.java | 6 - .../list/mutable/AbstractMutableList.java | 18 - .../impl/list/mutable/ArrayListAdapter.java | 7 - .../impl/list/mutable/FastList.java | 13 - .../impl/map/mutable/UnifiedMap.java | 8 - .../ordered/mutable/OrderedMapAdapter.java | 7 - .../immutable/AbstractImmutableSortedMap.java | 7 - .../mutable/AbstractMutableSortedMap.java | 7 - .../sorted/mutable/SynchronizedSortedMap.java | 7 - .../sorted/mutable/UnmodifiableTreeMap.java | 6 - .../immutable/AbstractImmutableSortedSet.java | 6 - .../set/sorted/mutable/SortedSetAdapter.java | 6 - .../sorted/mutable/SynchronizedSortedSet.java | 6 - .../set/sorted/mutable/TreeSortedSet.java | 6 - .../test/set/mutable/HashBiMapKeySetTest.java | 6 - .../set/mutable/UnifiedMapKeySetTest.java | 6 - .../mutable/UnmodifiableMutableSetTest.java | 6 - .../impl/bag/sorted/mutable/TreeBagTest.java | 14 - .../list/ParallelListIterableTest.java | 7 - .../UnmodifiableMutableListTestCase.java | 7 - ...AbstractImmutableBooleanStackTestCase.java | 8 - .../primitive/BooleanArrayStackTest.java | 8 - 29 files changed, 1385 insertions(+), 244 deletions(-) diff --git a/.idea/inspectionProfiles/2_Inconsistent_Constructs.xml b/.idea/inspectionProfiles/2_Inconsistent_Constructs.xml index 280e0ea944..048b7ae5a4 100644 --- a/.idea/inspectionProfiles/2_Inconsistent_Constructs.xml +++ b/.idea/inspectionProfiles/2_Inconsistent_Constructs.xml @@ -1,7 +1,6 @@ \ No newline at end of file diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/bag/immutable/ImmutableSingletonBag.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/bag/immutable/ImmutableSingletonBag.java index ca4d63398b..4596360424 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/bag/immutable/ImmutableSingletonBag.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/bag/immutable/ImmutableSingletonBag.java @@ -441,12 +441,6 @@ public MutableMap toMapOfItemToCount() return UnifiedMap.newWithKeysValues(this.value, 1); } - @Override - public ImmutableBag toImmutable() - { - return this; - } - @Override public void each(Procedure procedure) { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/bag/sorted/immutable/AbstractImmutableSortedBag.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/bag/sorted/immutable/AbstractImmutableSortedBag.java index 68c8c4184a..cafd397555 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/bag/sorted/immutable/AbstractImmutableSortedBag.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/bag/sorted/immutable/AbstractImmutableSortedBag.java @@ -14,7 +14,6 @@ import java.util.Comparator; import java.util.Iterator; -import org.eclipse.collections.api.LazyIterable; import org.eclipse.collections.api.RichIterable; import org.eclipse.collections.api.bag.ImmutableBag; import org.eclipse.collections.api.bag.MutableBag; @@ -39,7 +38,6 @@ import org.eclipse.collections.api.factory.Bags; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.SortedBags; -import org.eclipse.collections.api.factory.Stacks; import org.eclipse.collections.api.factory.primitive.BooleanLists; import org.eclipse.collections.api.factory.primitive.ByteLists; import org.eclipse.collections.api.factory.primitive.CharLists; @@ -63,7 +61,6 @@ import org.eclipse.collections.api.partition.bag.sorted.PartitionImmutableSortedBag; import org.eclipse.collections.api.partition.bag.sorted.PartitionMutableSortedBag; import org.eclipse.collections.api.set.sorted.ImmutableSortedSet; -import org.eclipse.collections.api.stack.MutableStack; import org.eclipse.collections.api.tuple.Pair; import org.eclipse.collections.api.tuple.primitive.ObjectIntPair; import org.eclipse.collections.impl.bag.immutable.AbstractImmutableBagIterable; @@ -418,12 +415,6 @@ private MutableList> occurrencesSortingBy(int n, IntFunction toStack() - { - return Stacks.mutable.withAll(this); - } - @Override public RichIterable> chunk(int size) { @@ -460,10 +451,4 @@ public int detectLastIndex(Predicate predicate) { throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".detectLastIndex() not implemented yet"); } - - @Override - public LazyIterable asReversed() - { - throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".asReversed() not implemented yet"); - } } diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/bag/sorted/mutable/SynchronizedSortedBag.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/bag/sorted/mutable/SynchronizedSortedBag.java index fcb233c7c9..0dab975166 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/bag/sorted/mutable/SynchronizedSortedBag.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/bag/sorted/mutable/SynchronizedSortedBag.java @@ -17,7 +17,6 @@ import java.util.Optional; import java.util.concurrent.ExecutorService; -import org.eclipse.collections.api.LazyIterable; import org.eclipse.collections.api.RichIterable; import org.eclipse.collections.api.bag.ParallelBag; import org.eclipse.collections.api.bag.sorted.ImmutableSortedBag; @@ -699,12 +698,6 @@ public void reverseForEachWithIndex(ObjectIntProcedure procedure) } } - @Override - public LazyIterable asReversed() - { - throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".asReversed() not implemented yet"); - } - @Override public int detectLastIndex(Predicate predicate) { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/lazy/parallel/ParallelDistinctIterable.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/lazy/parallel/ParallelDistinctIterable.java index 9371884b86..11812091fa 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/lazy/parallel/ParallelDistinctIterable.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/lazy/parallel/ParallelDistinctIterable.java @@ -20,7 +20,6 @@ import org.eclipse.collections.api.map.ConcurrentMutableMap; import org.eclipse.collections.api.map.MapIterable; import org.eclipse.collections.api.multimap.set.UnsortedSetMultimap; -import org.eclipse.collections.api.set.ParallelUnsortedSetIterable; import org.eclipse.collections.impl.lazy.parallel.list.DistinctBatch; import org.eclipse.collections.impl.lazy.parallel.set.AbstractParallelUnsortedSetIterable; import org.eclipse.collections.impl.lazy.parallel.set.UnsortedSetBatch; @@ -57,12 +56,6 @@ public LazyIterable> split() return this.delegate.split().collect(batch -> new DistinctBatch<>(batch, distinct)); } - @Override - public ParallelUnsortedSetIterable asUnique() - { - return this; - } - @Override public void forEach(Procedure procedure) { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/lazy/parallel/list/ParallelDistinctListIterable.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/lazy/parallel/list/ParallelDistinctListIterable.java index 6f2f88a1a4..a8bec086e7 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/lazy/parallel/list/ParallelDistinctListIterable.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/lazy/parallel/list/ParallelDistinctListIterable.java @@ -20,7 +20,6 @@ import org.eclipse.collections.api.map.ConcurrentMutableMap; import org.eclipse.collections.api.map.MapIterable; import org.eclipse.collections.api.multimap.set.UnsortedSetMultimap; -import org.eclipse.collections.api.set.ParallelUnsortedSetIterable; import org.eclipse.collections.impl.lazy.parallel.set.AbstractParallelUnsortedSetIterable; import org.eclipse.collections.impl.lazy.parallel.set.UnsortedSetBatch; import org.eclipse.collections.impl.map.mutable.ConcurrentHashMap; @@ -56,12 +55,6 @@ public LazyIterable> split() return this.delegate.split().collect(listBatch -> listBatch.distinct(distinct)); } - @Override - public ParallelUnsortedSetIterable asUnique() - { - return this; - } - @Override public void forEach(Procedure procedure) { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/fixed/AbstractArrayAdapter.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/fixed/AbstractArrayAdapter.java index 44adab6b0e..075456a54c 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/fixed/AbstractArrayAdapter.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/fixed/AbstractArrayAdapter.java @@ -39,7 +39,6 @@ import org.eclipse.collections.impl.list.mutable.FastList; import org.eclipse.collections.impl.list.mutable.ListAdapter; import org.eclipse.collections.impl.utility.ArrayIterate; -import org.eclipse.collections.impl.utility.Iterate; import org.eclipse.collections.impl.utility.ListIterate; import org.eclipse.collections.impl.utility.internal.InternalArrayIterate; import org.eclipse.collections.impl.utility.internal.RandomAccessListIterate; @@ -296,12 +295,6 @@ public boolean remove(Object o) throw new UnsupportedOperationException("Cannot call remove() on " + this.getClass().getSimpleName()); } - @Override - public boolean containsAll(Collection collection) - { - return Iterate.allSatisfyWith(collection, Predicates2.in(), this); - } - @Override public boolean addAll(Collection collection) { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/immutable/AbstractImmutableList.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/immutable/AbstractImmutableList.java index 818cb5b4ee..64c290cc1b 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/immutable/AbstractImmutableList.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/immutable/AbstractImmutableList.java @@ -947,12 +947,6 @@ protected Object writeReplace() return Lists.immutable.withAll(this); } - @Override - public Iterator iterator() - { - return this.listIterator(0); - } - @Override public ImmutableSubList subList(int fromIndex, int toIndex) { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/mutable/AbstractMutableList.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/mutable/AbstractMutableList.java index 09ee6906be..9042ff98c7 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/mutable/AbstractMutableList.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/mutable/AbstractMutableList.java @@ -775,12 +775,6 @@ public void add(T o) }; } - @Override - public MutableList subList(int fromIndex, int toIndex) - { - return new SubList<>(this, fromIndex, toIndex); - } - private void checkIfOutOfBounds(int index) { if (index >= this.size || index < 0) @@ -814,18 +808,6 @@ public MutableStack toStack() { return ArrayStack.newStack(this); } - - @Override - public void forEachWithIndex(ObjectIntProcedure objectIntProcedure) - { - ListIterate.forEachWithIndex(this, objectIntProcedure); - } - - @Override - public

void forEachWith(Procedure2 procedure, P parameter) - { - ListIterate.forEachWith(this, procedure, parameter); - } } @Override diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/mutable/ArrayListAdapter.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/mutable/ArrayListAdapter.java index 894830cf86..bcad42990f 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/mutable/ArrayListAdapter.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/mutable/ArrayListAdapter.java @@ -29,7 +29,6 @@ import org.eclipse.collections.api.partition.list.PartitionMutableList; import org.eclipse.collections.api.tuple.Pair; import org.eclipse.collections.impl.block.procedure.CollectionAddProcedure; -import org.eclipse.collections.impl.lazy.ReverseIterable; import org.eclipse.collections.impl.multimap.list.FastListMultimap; import org.eclipse.collections.impl.utility.ArrayIterate; import org.eclipse.collections.impl.utility.ArrayListIterate; @@ -429,10 +428,4 @@ public PartitionMutableList partitionWhile(Predicate predicate) { return ArrayListIterate.partitionWhile(this.delegate, predicate); } - - @Override - public ReverseIterable asReversed() - { - return ReverseIterable.adapt(this); - } } diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/mutable/FastList.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/mutable/FastList.java index 9facb96bbf..0501d34d3c 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/mutable/FastList.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/list/mutable/FastList.java @@ -84,7 +84,6 @@ import org.eclipse.collections.api.partition.list.PartitionMutableList; import org.eclipse.collections.api.tuple.Twin; import org.eclipse.collections.impl.block.factory.Comparators; -import org.eclipse.collections.impl.block.factory.Predicates2; import org.eclipse.collections.impl.block.factory.Procedures2; import org.eclipse.collections.impl.map.mutable.UnifiedMap; import org.eclipse.collections.impl.multimap.list.FastListMultimap; @@ -342,18 +341,6 @@ private void addAllCollection(Collection source) Iterate.forEachWith(source, Procedures2.addToCollection(), this); } - @Override - public boolean containsAll(Collection source) - { - return Iterate.allSatisfyWith(source, Predicates2.in(), this); - } - - @Override - public boolean containsAllArguments(Object... source) - { - return ArrayIterate.allSatisfyWith(source, Predicates2.in(), this); - } - @Override public E[] toArray(E[] array) { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/mutable/UnifiedMap.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/mutable/UnifiedMap.java index 9d9b9ebbb3..7dc5e4dafa 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/mutable/UnifiedMap.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/mutable/UnifiedMap.java @@ -33,9 +33,7 @@ import org.eclipse.collections.api.block.procedure.Procedure; import org.eclipse.collections.api.block.procedure.Procedure2; import org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure; -import org.eclipse.collections.api.factory.Maps; import org.eclipse.collections.api.factory.Sets; -import org.eclipse.collections.api.map.ImmutableMap; import org.eclipse.collections.api.map.MapIterable; import org.eclipse.collections.api.map.MutableMap; import org.eclipse.collections.api.map.UnsortedMapIterable; @@ -3318,10 +3316,4 @@ private boolean nonNullTableObjectEquals(Object cur, K key) { return cur == key || (cur == NULL_KEY ? key == null : cur.equals(key)); } - - @Override - public ImmutableMap toImmutable() - { - return Maps.immutable.withAll(this); - } } diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/ordered/mutable/OrderedMapAdapter.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/ordered/mutable/OrderedMapAdapter.java index 448c55e68a..12113ef1de 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/ordered/mutable/OrderedMapAdapter.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/ordered/mutable/OrderedMapAdapter.java @@ -16,7 +16,6 @@ import java.util.Map; import java.util.Optional; -import org.eclipse.collections.api.LazyIterable; import org.eclipse.collections.api.RichIterable; import org.eclipse.collections.api.bag.MutableBag; import org.eclipse.collections.api.block.function.Function; @@ -570,12 +569,6 @@ public MutableOrderedMap groupByUniqueKey(Function asReversed() - { - throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".asReversed() not implemented yet"); - } - @Override public int detectLastIndex(Predicate predicate) { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/immutable/AbstractImmutableSortedMap.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/immutable/AbstractImmutableSortedMap.java index 8ee1d35fa5..067999576f 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/immutable/AbstractImmutableSortedMap.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/immutable/AbstractImmutableSortedMap.java @@ -15,7 +15,6 @@ import java.util.Optional; import java.util.SortedMap; -import org.eclipse.collections.api.LazyIterable; import org.eclipse.collections.api.bag.ImmutableBag; import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function0; @@ -505,12 +504,6 @@ public ImmutableObjectDoubleMap sumByDouble(Function asReversed() - { - throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".asReversed() not implemented yet"); - } - @Override public ImmutableSortedMap toReversed() { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/mutable/AbstractMutableSortedMap.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/mutable/AbstractMutableSortedMap.java index 785f5c5986..9682dc6a44 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/mutable/AbstractMutableSortedMap.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/mutable/AbstractMutableSortedMap.java @@ -10,7 +10,6 @@ package org.eclipse.collections.impl.map.sorted.mutable; -import org.eclipse.collections.api.LazyIterable; import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.primitive.BooleanFunction; @@ -325,12 +324,6 @@ public MutableMap groupByUniqueKey(Function return this.groupByUniqueKey(function, UnifiedMap.newMap(this.size())); } - @Override - public LazyIterable asReversed() - { - throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".asReversed() not implemented yet"); - } - @Override public int detectLastIndex(Predicate predicate) { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/mutable/SynchronizedSortedMap.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/mutable/SynchronizedSortedMap.java index 3359fc4bc6..1113d18c37 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/mutable/SynchronizedSortedMap.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/mutable/SynchronizedSortedMap.java @@ -17,7 +17,6 @@ import java.util.Optional; import java.util.SortedMap; -import org.eclipse.collections.api.LazyIterable; import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.primitive.BooleanFunction; @@ -601,12 +600,6 @@ public void reverseForEachWithIndex(ObjectIntProcedure procedure) } } - @Override - public LazyIterable asReversed() - { - throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".asReversed() not implemented yet"); - } - @Override public int detectLastIndex(Predicate predicate) { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/mutable/UnmodifiableTreeMap.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/mutable/UnmodifiableTreeMap.java index 26baa09073..7eb4e896ca 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/mutable/UnmodifiableTreeMap.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/map/sorted/mutable/UnmodifiableTreeMap.java @@ -1320,12 +1320,6 @@ public MutableList distinct() throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".distinct() not implemented yet"); } - @Override - public LazyIterable asReversed() - { - throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".asReversed() not implemented yet"); - } - @Override public int detectLastIndex(Predicate predicate) { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/immutable/AbstractImmutableSortedSet.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/immutable/AbstractImmutableSortedSet.java index a1616f5112..c1d5e3544e 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/immutable/AbstractImmutableSortedSet.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/immutable/AbstractImmutableSortedSet.java @@ -498,12 +498,6 @@ public ParallelSortedSetIterable asParallel(ExecutorService executorService, return new NonParallelSortedSetIterable<>(this); } - @Override - public LazyIterable asReversed() - { - throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".asReversed() not implemented yet"); - } - @Override public ImmutableSortedSet toReversed() { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/mutable/SortedSetAdapter.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/mutable/SortedSetAdapter.java index 2dc0256952..2de6b3bbce 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/mutable/SortedSetAdapter.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/mutable/SortedSetAdapter.java @@ -674,12 +674,6 @@ public void reverseForEachWithIndex(ObjectIntProcedure procedure) throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".reverseForEachWithIndex() not implemented yet"); } - @Override - public LazyIterable asReversed() - { - throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".asReversed() not implemented yet"); - } - @Override public int detectLastIndex(Predicate predicate) { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/mutable/SynchronizedSortedSet.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/mutable/SynchronizedSortedSet.java index 0a40a74eba..a17f490899 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/mutable/SynchronizedSortedSet.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/mutable/SynchronizedSortedSet.java @@ -654,12 +654,6 @@ public void reverseForEachWithIndex(ObjectIntProcedure procedure) } } - @Override - public LazyIterable asReversed() - { - throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".asReversed() not implemented yet"); - } - @Override public MutableSortedSet toReversed() { diff --git a/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/mutable/TreeSortedSet.java b/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/mutable/TreeSortedSet.java index dab5225f41..45ef2941b6 100644 --- a/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/mutable/TreeSortedSet.java +++ b/eclipse-collections/src/main/java/org/eclipse/collections/impl/set/sorted/mutable/TreeSortedSet.java @@ -761,12 +761,6 @@ public void reverseForEachWithIndex(ObjectIntProcedure procedure) throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".reverseForEachWithIndex() not implemented yet"); } - @Override - public LazyIterable asReversed() - { - throw new UnsupportedOperationException(this.getClass().getSimpleName() + ".asReversed() not implemented yet"); - } - @Override public int detectLastIndex(Predicate predicate) { diff --git a/unit-tests-java8/src/test/java/org/eclipse/collections/test/set/mutable/HashBiMapKeySetTest.java b/unit-tests-java8/src/test/java/org/eclipse/collections/test/set/mutable/HashBiMapKeySetTest.java index f21466577a..8b83fa57e3 100644 --- a/unit-tests-java8/src/test/java/org/eclipse/collections/test/set/mutable/HashBiMapKeySetTest.java +++ b/unit-tests-java8/src/test/java/org/eclipse/collections/test/set/mutable/HashBiMapKeySetTest.java @@ -45,10 +45,4 @@ public void Collection_add() // TODO Move up to a keySet view abstraction SetTestCase.super.Collection_add(); } - - @Override - public boolean allowsDuplicates() - { - return false; - } } diff --git a/unit-tests-java8/src/test/java/org/eclipse/collections/test/set/mutable/UnifiedMapKeySetTest.java b/unit-tests-java8/src/test/java/org/eclipse/collections/test/set/mutable/UnifiedMapKeySetTest.java index fee627c792..c0c46c3c9a 100644 --- a/unit-tests-java8/src/test/java/org/eclipse/collections/test/set/mutable/UnifiedMapKeySetTest.java +++ b/unit-tests-java8/src/test/java/org/eclipse/collections/test/set/mutable/UnifiedMapKeySetTest.java @@ -42,12 +42,6 @@ public final Set newWith(T... elements) return result.keySet(); } - @Override - public boolean allowsDuplicates() - { - return false; - } - @Override @Test(expected = UnsupportedOperationException.class) public void Collection_add() diff --git a/unit-tests-java8/src/test/java/org/eclipse/collections/test/set/mutable/UnmodifiableMutableSetTest.java b/unit-tests-java8/src/test/java/org/eclipse/collections/test/set/mutable/UnmodifiableMutableSetTest.java index db47b5a5c7..ce3b442dbf 100644 --- a/unit-tests-java8/src/test/java/org/eclipse/collections/test/set/mutable/UnmodifiableMutableSetTest.java +++ b/unit-tests-java8/src/test/java/org/eclipse/collections/test/set/mutable/UnmodifiableMutableSetTest.java @@ -19,12 +19,6 @@ @RunWith(Java8Runner.class) public class UnmodifiableMutableSetTest implements UnmodifiableMutableSetTestCase { - @Override - public boolean allowsDuplicates() - { - return false; - } - @SafeVarargs @Override public final MutableSet newWith(T... elements) diff --git a/unit-tests/src/test/java/org/eclipse/collections/impl/bag/sorted/mutable/TreeBagTest.java b/unit-tests/src/test/java/org/eclipse/collections/impl/bag/sorted/mutable/TreeBagTest.java index 23deaabd31..01a83a25ee 100644 --- a/unit-tests/src/test/java/org/eclipse/collections/impl/bag/sorted/mutable/TreeBagTest.java +++ b/unit-tests/src/test/java/org/eclipse/collections/impl/bag/sorted/mutable/TreeBagTest.java @@ -125,20 +125,6 @@ public void serialization() Verify.assertPostSerializedEqualsAndHashCode(bag); } - @Override - @Test(expected = NullPointerException.class) - public void min_null_safe() - { - super.min_null_safe(); - } - - @Override - @Test(expected = NullPointerException.class) - public void max_null_safe() - { - super.max_null_safe(); - } - @Override @Test public void collectWithOccurrences() diff --git a/unit-tests/src/test/java/org/eclipse/collections/impl/lazy/parallel/list/ParallelListIterableTest.java b/unit-tests/src/test/java/org/eclipse/collections/impl/lazy/parallel/list/ParallelListIterableTest.java index dac1f6b8e2..5261e0fcac 100644 --- a/unit-tests/src/test/java/org/eclipse/collections/impl/lazy/parallel/list/ParallelListIterableTest.java +++ b/unit-tests/src/test/java/org/eclipse/collections/impl/lazy/parallel/list/ParallelListIterableTest.java @@ -10,7 +10,6 @@ package org.eclipse.collections.impl.lazy.parallel.list; -import org.eclipse.collections.api.list.ListIterable; import org.eclipse.collections.api.list.ParallelListIterable; import org.eclipse.collections.impl.list.mutable.FastList; import org.junit.Test; @@ -29,12 +28,6 @@ protected ParallelListIterable newWith(Integer... littleElements) return FastList.newListWith(littleElements).asParallel(this.executorService, this.batchSize); } - @Override - protected ListIterable getExpectedWith(Integer... littleElements) - { - return FastList.newListWith(littleElements); - } - @Test(expected = IllegalArgumentException.class) public void asParallel_small_batch() { diff --git a/unit-tests/src/test/java/org/eclipse/collections/impl/list/mutable/UnmodifiableMutableListTestCase.java b/unit-tests/src/test/java/org/eclipse/collections/impl/list/mutable/UnmodifiableMutableListTestCase.java index 749c30de78..bc214a3cbe 100644 --- a/unit-tests/src/test/java/org/eclipse/collections/impl/list/mutable/UnmodifiableMutableListTestCase.java +++ b/unit-tests/src/test/java/org/eclipse/collections/impl/list/mutable/UnmodifiableMutableListTestCase.java @@ -92,13 +92,6 @@ public void set() Assert.assertThrows(UnsupportedOperationException.class, () -> this.getCollection().set(0, null)); } - @Override - @Test - public void addAtIndex() - { - Assert.assertThrows(UnsupportedOperationException.class, () -> this.getCollection().add(0, null)); - } - @Override @Test public void addAllAtIndex() diff --git a/unit-tests/src/test/java/org/eclipse/collections/impl/stack/immutable/primitive/AbstractImmutableBooleanStackTestCase.java b/unit-tests/src/test/java/org/eclipse/collections/impl/stack/immutable/primitive/AbstractImmutableBooleanStackTestCase.java index 4730b2075d..a14395eb2d 100644 --- a/unit-tests/src/test/java/org/eclipse/collections/impl/stack/immutable/primitive/AbstractImmutableBooleanStackTestCase.java +++ b/unit-tests/src/test/java/org/eclipse/collections/impl/stack/immutable/primitive/AbstractImmutableBooleanStackTestCase.java @@ -11,12 +11,10 @@ package org.eclipse.collections.impl.stack.immutable.primitive; import org.eclipse.collections.api.BooleanIterable; -import org.eclipse.collections.api.RichIterable; import org.eclipse.collections.api.stack.primitive.ImmutableBooleanStack; import org.eclipse.collections.api.stack.primitive.MutableBooleanStack; import org.eclipse.collections.impl.factory.primitive.BooleanStacks; import org.eclipse.collections.impl.list.mutable.primitive.BooleanArrayList; -import org.eclipse.collections.impl.stack.mutable.ArrayStack; import org.eclipse.collections.impl.stack.mutable.primitive.BooleanArrayStack; import org.eclipse.collections.impl.stack.primitive.AbstractBooleanStackTestCase; import org.eclipse.collections.impl.test.Verify; @@ -43,12 +41,6 @@ protected MutableBooleanStack newMutableCollectionWith(boolean... elements) return BooleanArrayStack.newStackWith(elements); } - @Override - protected RichIterable newObjectCollectionWith(Object... elements) - { - return ArrayStack.newStackWith(elements); - } - @Override protected ImmutableBooleanStack newWithTopToBottom(boolean... elements) { diff --git a/unit-tests/src/test/java/org/eclipse/collections/impl/stack/mutable/primitive/BooleanArrayStackTest.java b/unit-tests/src/test/java/org/eclipse/collections/impl/stack/mutable/primitive/BooleanArrayStackTest.java index e9f17e2e8a..3535b026af 100644 --- a/unit-tests/src/test/java/org/eclipse/collections/impl/stack/mutable/primitive/BooleanArrayStackTest.java +++ b/unit-tests/src/test/java/org/eclipse/collections/impl/stack/mutable/primitive/BooleanArrayStackTest.java @@ -11,12 +11,10 @@ package org.eclipse.collections.impl.stack.mutable.primitive; import org.eclipse.collections.api.BooleanIterable; -import org.eclipse.collections.api.RichIterable; import org.eclipse.collections.api.stack.primitive.MutableBooleanStack; import org.eclipse.collections.impl.collection.mutable.primitive.AbstractMutableBooleanStackTestCase; import org.eclipse.collections.impl.factory.primitive.BooleanStacks; import org.eclipse.collections.impl.list.mutable.primitive.BooleanArrayList; -import org.eclipse.collections.impl.stack.mutable.ArrayStack; import org.eclipse.collections.impl.test.Verify; import org.junit.Assert; import org.junit.Test; @@ -44,12 +42,6 @@ protected MutableBooleanStack newMutableCollectionWith(boolean... elements) return BooleanArrayStack.newStackWith(elements); } - @Override - protected RichIterable newObjectCollectionWith(Object... elements) - { - return ArrayStack.newStackWith(elements); - } - @Override protected MutableBooleanStack newWithTopToBottom(boolean... elements) {