------------------------------------------------------------ revno: 13869 committer: Lars Helge Ă˜verland <larshe...@gmail.com> branch nick: dhis2 timestamp: Mon 2014-01-27 13:46:11 +0200 message: HibernateEventListenerWiring, parameterizing collections modified: dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.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-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java' --- dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java 2014-01-27 08:02:13 +0000 +++ dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java 2014-01-27 11:46:11 +0000 @@ -95,12 +95,12 @@ Object newValue = event.getCollection().getValue(); Serializable oldValue = event.getCollection().getStoredSnapshot(); - Collection newCol = new ArrayList(); - Collection oldCol = new ArrayList(); + Collection<Object> newCol = new ArrayList<Object>(); + Collection<Object> oldCol = new ArrayList<Object>(); if ( Collection.class.isInstance( newValue ) ) { - newCol = new ArrayList( (Collection) newValue ); + newCol = new ArrayList<Object>( (Collection<Object>) newValue ); if ( !newCol.isEmpty() ) { @@ -108,12 +108,12 @@ if ( !(next instanceof IdentifiableObject) ) { - newCol = new ArrayList(); + newCol = new ArrayList<Object>(); } } } - Map map = (Map) oldValue; + Map<?,?> map = (Map<?,?>) oldValue; for ( Object o : map.keySet() ) { @@ -123,8 +123,8 @@ } } - Collection removed = CollectionUtils.subtract( oldCol, newCol ); - Collection added = CollectionUtils.subtract( newCol, oldCol ); + Collection<? extends IdentifiableObject> removed = CollectionUtils.subtract( oldCol, newCol ); + Collection<? extends IdentifiableObject> added = CollectionUtils.subtract( newCol, oldCol ); identifiableObjects.addAll( removed ); identifiableObjects.addAll( added );
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp