diff --git a/src/java/org/apache/commons/collections/set/TransformedSet.java b/src/java/org/apache/commons/collections/set/TransformedSet.java index d34725b57..4a2c08565 100644 --- a/src/java/org/apache/commons/collections/set/TransformedSet.java +++ b/src/java/org/apache/commons/collections/set/TransformedSet.java @@ -70,11 +70,11 @@ public class TransformedSet extends TransformedCollection implements Set Set decorateTransform(Set set, Transformer transformer) { + TransformedSet decorated = new TransformedSet(set, transformer); if (transformer != null && set != null && set.size() > 0) { - Object[] values = set.toArray(); + @SuppressWarnings("unchecked") // set is type E + E[] values = (E[]) set.toArray(); set.clear(); for(int i=0; i