Removed code to disallow adding an observer more than once since the

observer list now takes care of that.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2064 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2002-12-12 23:56:36 +00:00
parent 96888709ff
commit 90a919720a
3 changed files with 5 additions and 16 deletions
@@ -1,5 +1,5 @@
//
// $Id: AbstractMedia.java,v 1.5 2002/11/20 05:32:51 mdb Exp $
// $Id: AbstractMedia.java,v 1.6 2002/12/12 23:54:59 shaper Exp $
package com.threerings.media;
@@ -205,13 +205,7 @@ public abstract class AbstractMedia
{
if (_observers == null) {
_observers = new ObserverList(ObserverList.FAST_UNSAFE_NOTIFY);
} else if (_observers.contains(obs)) {
Log.info("Attempt to observe media already observing " +
"[media=" + this + ", obs=" + obs + "].");
return;
}
_observers.add(obs);
}
@@ -1,5 +1,5 @@
//
// $Id: Client.java,v 1.34 2002/10/31 18:44:34 mdb Exp $
// $Id: Client.java,v 1.35 2002/12/12 23:56:10 shaper Exp $
package com.threerings.presents.client;
@@ -78,10 +78,7 @@ public class Client
public void addClientObserver (SessionObserver observer)
{
synchronized (_observers) {
// disallow multiple instances of the same observer
if (!_observers.contains(observer)) {
_observers.add(observer);
}
_observers.add(observer);
}
}
@@ -1,5 +1,5 @@
//
// $Id: ConnectionManager.java,v 1.27 2002/12/07 22:33:04 mdb Exp $
// $Id: ConnectionManager.java,v 1.28 2002/12/12 23:56:36 shaper Exp $
package com.threerings.presents.server.net;
@@ -122,9 +122,7 @@ public class ConnectionManager extends LoopingThread
public void addConnectionObserver (ConnectionObserver observer)
{
synchronized (_observers) {
if (!_observers.contains(observer)) {
_observers.add(observer);
}
_observers.add(observer);
}
}