diff --git a/src/java/org/apache/commons/collections/collection/TransformedCollection.java b/src/java/org/apache/commons/collections/collection/TransformedCollection.java index e54188333..57a315b98 100644 --- a/src/java/org/apache/commons/collections/collection/TransformedCollection.java +++ b/src/java/org/apache/commons/collections/collection/TransformedCollection.java @@ -76,11 +76,11 @@ public class TransformedCollection extends AbstractCollectionDecorator { * @throws IllegalArgumentException if collection or transformer is null * @since Commons Collections 3.3 */ - // TODO: Generics - public static Collection decorateTransform(Collection collection, Transformer transformer) { - TransformedCollection decorated = new TransformedCollection(collection, transformer); + public static Collection decorateTransform(Collection collection, Transformer transformer) { + TransformedCollection decorated = new TransformedCollection(collection, transformer); if (transformer != null && collection != null && collection.size() > 0) { - Object[] values = collection.toArray(); + @SuppressWarnings("unchecked") // collection is of type E + E[] values = (E[]) collection.toArray(); collection.clear(); for(int i=0; i