From 1993a8e556808688d17f60fb5a4bfdcc838f435c Mon Sep 17 00:00:00 2001
From: Ismael Juma <ismael@juma.me.uk>
Date: Thu, 26 May 2011 21:59:48 +0100
Subject: [PATCH] Use += instead of + for mutable sequences as the latter is
 deprecated.

---
 core/src/main/scala/spark/BitTorrentBroadcast.scala | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/src/main/scala/spark/BitTorrentBroadcast.scala b/core/src/main/scala/spark/BitTorrentBroadcast.scala
index dba9d39abf..887f6e5178 100644
--- a/core/src/main/scala/spark/BitTorrentBroadcast.scala
+++ b/core/src/main/scala/spark/BitTorrentBroadcast.scala
@@ -113,7 +113,7 @@ extends Broadcast[T] with Logging {
     }
     
     // In the beginning, this is the only known source to Guide
-    listOfSources = listOfSources + masterSource
+    listOfSources += masterSource
 
     // Register with the Tracker
     BitTorrentBroadcast.registerValue (uuid, 
@@ -268,7 +268,7 @@ extends Broadcast[T] with Logging {
       if (listOfSources.contains(newSourceInfo)) { 
         listOfSources = listOfSources - newSourceInfo 
       }
-      listOfSources = listOfSources + newSourceInfo
+      listOfSources += newSourceInfo
     }         
   }  
   
@@ -446,7 +446,7 @@ extends Broadcast[T] with Logging {
             // Add to peersNowTalking. Remove in the thread. We have to do this 
             // ASAP, otherwise pickPeerToTalkTo picks the same peer more than once
             peersNowTalking.synchronized { 
-              peersNowTalking = peersNowTalking + peerToTalkTo
+              peersNowTalking += peerToTalkTo
             }
           }
           
@@ -878,7 +878,7 @@ extends Broadcast[T] with Logging {
                 i = i - 1
               }
               
-              selectedSources = selectedSources + curPeer
+              selectedSources += curPeer
               alreadyPicked.set (i)
               
               picksLeft = picksLeft - 1
-- 
GitLab