Author: manik.surtani(a)jboss.com
Date: 2009-08-20 12:19:49 -0400 (Thu, 20 Aug 2009)
New Revision: 8196
Modified:
core/trunk/src/main/java/org/jboss/cache/util/Immutables.java
Log:
Immutables fix
Modified: core/trunk/src/main/java/org/jboss/cache/util/Immutables.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/util/Immutables.java 2009-08-18 20:56:26 UTC
(rev 8195)
+++ core/trunk/src/main/java/org/jboss/cache/util/Immutables.java 2009-08-20 16:19:49 UTC
(rev 8196)
@@ -23,19 +23,8 @@
import java.io.Serializable;
import java.lang.reflect.Array;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.Map.Entry;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
/**
* Factory for generating immutable type wrappers.
@@ -212,10 +201,10 @@
@SuppressWarnings("unchecked")
private static <T extends Collection> T attemptKnownSetCopy(T set)
{
- if (set instanceof HashSet)
- return (T) ((HashSet) set).clone();
if (set instanceof LinkedHashSet)
return (T) ((LinkedHashSet) set).clone();
+ if (set instanceof HashSet)
+ return (T) ((HashSet) set).clone();
if (set instanceof TreeSet)
return (T) ((TreeSet) set).clone();
Show replies by date