← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9280: Immutable sets in message service

 

------------------------------------------------------------
revno: 9280
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-12-12 11:55:21 +0100
message:
  Immutable sets in message service
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.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-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java	2012-12-04 15:27:28 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java	2012-12-12 10:55:21 +0000
@@ -161,7 +161,7 @@
 
         updateMessageConversation( conversation );
 
-        invokeMessageSenders( conversation.getSubject(), text, sender, conversation.getUsers() );
+        invokeMessageSenders( conversation.getSubject(), text, sender, new HashSet<User>( conversation.getUsers() ) );
     }
 
     public int sendCompletenessMessage( CompleteDataSetRegistration registration )
@@ -181,7 +181,7 @@
         
         if ( userGroup != null )
         {
-            recipients.addAll( userGroup.getMembers() );
+            recipients.addAll( new HashSet<User>( userGroup.getMembers() ) );
         }
 
         if ( dataSet.isNotifyCompletingUser() )
@@ -209,7 +209,7 @@
         {
             int id = saveMessageConversation( conversation );
             
-            invokeMessageSenders( COMPLETE_SUBJECT, text, sender, conversation.getUsers() );
+            invokeMessageSenders( COMPLETE_SUBJECT, text, sender, new HashSet<User>( conversation.getUsers() ) );
             
             return id;
         }