diff --git a/src/main/java/org/apache/commons/collections4/bag/TransformedBag.java b/src/main/java/org/apache/commons/collections4/bag/TransformedBag.java index 760b4dcca..3f24440c5 100644 --- a/src/main/java/org/apache/commons/collections4/bag/TransformedBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/TransformedBag.java @@ -76,7 +76,7 @@ public class TransformedBag extends TransformedCollection implements Bag decorated = new TransformedBag(bag, transformer); if (transformer != null && bag != null && bag.size() > 0) { @SuppressWarnings("unchecked") // Bag is of type E - final E[] values = (E[]) bag.toArray(); + final E[] values = (E[]) bag.toArray(); // NOPMD - false positive for generics bag.clear(); for (final E value : values) { decorated.decorated().add(transformer.transform(value)); diff --git a/src/main/java/org/apache/commons/collections4/bag/TransformedSortedBag.java b/src/main/java/org/apache/commons/collections4/bag/TransformedSortedBag.java index 7d1db12b7..724b0c429 100644 --- a/src/main/java/org/apache/commons/collections4/bag/TransformedSortedBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/TransformedSortedBag.java @@ -77,7 +77,7 @@ public class TransformedSortedBag extends TransformedBag implements Sorted final TransformedSortedBag decorated = new TransformedSortedBag(bag, transformer); if (transformer != null && bag != null && bag.size() > 0) { @SuppressWarnings("unchecked") // bag is type E - final E[] values = (E[]) bag.toArray(); + final E[] values = (E[]) bag.toArray(); // NOPMD - false positive for generics bag.clear(); for (final E value : values) { decorated.decorated().add(transformer.transform(value)); diff --git a/src/main/java/org/apache/commons/collections4/collection/TransformedCollection.java b/src/main/java/org/apache/commons/collections4/collection/TransformedCollection.java index 1e751eb5e..7a776ebea 100644 --- a/src/main/java/org/apache/commons/collections4/collection/TransformedCollection.java +++ b/src/main/java/org/apache/commons/collections4/collection/TransformedCollection.java @@ -84,7 +84,7 @@ public class TransformedCollection extends AbstractCollectionDecorator { // null collection & transformer are disallowed by the constructor call above if (collection.size() > 0) { @SuppressWarnings("unchecked") // collection is of type E - final E[] values = (E[]) collection.toArray(); + final E[] values = (E[]) collection.toArray(); // NOPMD - false positive for generics collection.clear(); for (final E value : values) { decorated.decorated().add(transformer.transform(value)); diff --git a/src/main/java/org/apache/commons/collections4/list/TransformedList.java b/src/main/java/org/apache/commons/collections4/list/TransformedList.java index 927c4c915..a10f1899b 100644 --- a/src/main/java/org/apache/commons/collections4/list/TransformedList.java +++ b/src/main/java/org/apache/commons/collections4/list/TransformedList.java @@ -80,7 +80,7 @@ public class TransformedList extends TransformedCollection implements List final TransformedList decorated = new TransformedList(list, transformer); if (transformer != null && list != null && list.size() > 0) { @SuppressWarnings("unchecked") // list is of type E - final E[] values = (E[]) list.toArray(); + final E[] values = (E[]) list.toArray(); // NOPMD - false positive for generics list.clear(); for (final E value : values) { decorated.decorated().add(transformer.transform(value)); diff --git a/src/main/java/org/apache/commons/collections4/queue/TransformedQueue.java b/src/main/java/org/apache/commons/collections4/queue/TransformedQueue.java index ec934ffe8..88a25568b 100644 --- a/src/main/java/org/apache/commons/collections4/queue/TransformedQueue.java +++ b/src/main/java/org/apache/commons/collections4/queue/TransformedQueue.java @@ -76,7 +76,7 @@ public class TransformedQueue extends TransformedCollection implements Que final TransformedQueue decorated = new TransformedQueue(queue, transformer); if (queue.size() > 0) { @SuppressWarnings("unchecked") // queue is type - final E[] values = (E[]) queue.toArray(); + final E[] values = (E[]) queue.toArray(); // NOPMD - false positive for generics queue.clear(); for (final E value : values) { decorated.decorated().add(transformer.transform(value)); diff --git a/src/main/java/org/apache/commons/collections4/set/TransformedSet.java b/src/main/java/org/apache/commons/collections4/set/TransformedSet.java index 1f8330d94..032560362 100644 --- a/src/main/java/org/apache/commons/collections4/set/TransformedSet.java +++ b/src/main/java/org/apache/commons/collections4/set/TransformedSet.java @@ -76,7 +76,7 @@ public class TransformedSet extends TransformedCollection implements Set decorated = new TransformedSet(set, transformer); if (transformer != null && set != null && set.size() > 0) { @SuppressWarnings("unchecked") // set is type E - final E[] values = (E[]) set.toArray(); + final E[] values = (E[]) set.toArray(); // NOPMD - false positive for generics set.clear(); for (final E value : values) { decorated.decorated().add(transformer.transform(value)); diff --git a/src/main/java/org/apache/commons/collections4/set/TransformedSortedSet.java b/src/main/java/org/apache/commons/collections4/set/TransformedSortedSet.java index 380200b81..f519616a7 100644 --- a/src/main/java/org/apache/commons/collections4/set/TransformedSortedSet.java +++ b/src/main/java/org/apache/commons/collections4/set/TransformedSortedSet.java @@ -78,7 +78,7 @@ public class TransformedSortedSet extends TransformedSet implements Sorted final TransformedSortedSet decorated = new TransformedSortedSet(set, transformer); if (transformer != null && set != null && set.size() > 0) { @SuppressWarnings("unchecked") // set is type E - final E[] values = (E[]) set.toArray(); + final E[] values = (E[]) set.toArray(); // NOPMD - false positive for generics set.clear(); for (final E value : values) { decorated.decorated().add(transformer.transform(value));