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