From 95e20438a0c5f2469f5abdf3274c0bfabcadb31b Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Tue, 19 Oct 2010 03:16:15 +0000 Subject: [PATCH] Generics git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1024100 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/commons/collections/list/TransformedList.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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