ignore false-positive from pmd
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1476593 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bca5b3c0ff
commit
047b8fb527
|
@ -76,7 +76,7 @@ public class TransformedBag<E> extends TransformedCollection<E> implements Bag<E
|
|||
final TransformedBag<E> decorated = new TransformedBag<E>(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));
|
||||
|
|
|
@ -77,7 +77,7 @@ public class TransformedSortedBag<E> extends TransformedBag<E> implements Sorted
|
|||
final TransformedSortedBag<E> decorated = new TransformedSortedBag<E>(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));
|
||||
|
|
|
@ -84,7 +84,7 @@ public class TransformedCollection<E> extends AbstractCollectionDecorator<E> {
|
|||
// 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));
|
||||
|
|
|
@ -80,7 +80,7 @@ public class TransformedList<E> extends TransformedCollection<E> implements List
|
|||
final TransformedList<E> decorated = new TransformedList<E>(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));
|
||||
|
|
|
@ -76,7 +76,7 @@ public class TransformedQueue<E> extends TransformedCollection<E> implements Que
|
|||
final TransformedQueue<E> decorated = new TransformedQueue<E>(queue, transformer);
|
||||
if (queue.size() > 0) {
|
||||
@SuppressWarnings("unchecked") // queue is type <E>
|
||||
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));
|
||||
|
|
|
@ -76,7 +76,7 @@ public class TransformedSet<E> extends TransformedCollection<E> implements Set<E
|
|||
final TransformedSet<E> decorated = new TransformedSet<E>(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));
|
||||
|
|
|
@ -78,7 +78,7 @@ public class TransformedSortedSet<E> extends TransformedSet<E> implements Sorted
|
|||
final TransformedSortedSet<E> decorated = new TransformedSortedSet<E>(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));
|
||||
|
|
Loading…
Reference in New Issue