← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21657: minor

 

------------------------------------------------------------
revno: 21657
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2016-01-08 11:02:49 +0700
message:
  minor
modified:
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.java	2016-01-08 04:00:42 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.java	2016-01-08 04:02:49 +0000
@@ -34,7 +34,6 @@
 import org.hibernate.proxy.HibernateProxy;
 import org.hibernate.proxy.pojo.javassist.SerializableProxy;
 
-import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.Map;
 
@@ -83,17 +82,12 @@
         {
             PersistentCollection persistentCollection = (PersistentCollection) proxy;
 
-            if ( !PersistentSet.class.isInstance( persistentCollection ) )
-            {
-                return (T) persistentCollection.getStoredSnapshot();
-            }
-            else if ( PersistentSet.class.isInstance( persistentCollection ) )
+            if ( PersistentSet.class.isInstance( persistentCollection ) )
             {
                 Map<?, ?> map = (Map<?, ?>) persistentCollection.getStoredSnapshot();
                 return (T) new LinkedHashSet<>( map.keySet() );
             }
 
-            // for now just return same as for non-sets, but PersistentSets might require a bit of extra work.
             return (T) persistentCollection.getStoredSnapshot();
         }