diff --git a/src/java/com/threerings/crowd/client/OccupantObserver.java b/src/java/com/threerings/crowd/client/OccupantObserver.java index 5e6eba16b..daac9b53b 100644 --- a/src/java/com/threerings/crowd/client/OccupantObserver.java +++ b/src/java/com/threerings/crowd/client/OccupantObserver.java @@ -24,9 +24,9 @@ package com.threerings.crowd.client; import com.threerings.crowd.data.OccupantInfo; /** - * An entity that is interested in hearing about bodies that enter and - * leave a location (as well as disconnect and reconnect) can implement - * this interface and register itself with the {@link OccupantDirector}. + * An entity that is interested in hearing about bodies that enter and leave a location (as well + * as disconnect and reconnect) can implement this interface and register itself with the + * {@link OccupantDirector}. */ public interface OccupantObserver { diff --git a/src/java/com/threerings/presents/client/BlockingCommunicator.java b/src/java/com/threerings/presents/client/BlockingCommunicator.java index d3291e65c..020d875ba 100644 --- a/src/java/com/threerings/presents/client/BlockingCommunicator.java +++ b/src/java/com/threerings/presents/client/BlockingCommunicator.java @@ -212,7 +212,7 @@ public class BlockingCommunicator extends Communicator // let the client know that things went south notifyClientObservers(new ObserverOps.Client(_client) { - protected void notify (ClientObserver obs) { + @Override protected void notify (ClientObserver obs) { obs.clientConnectionFailed(_client, ioe); } }); @@ -268,7 +268,7 @@ public class BlockingCommunicator extends Communicator // let the client observers know that we're logged off notifyClientObservers(new ObserverOps.Session(_client) { - protected void notify (SessionObserver obs) { + @Override protected void notify (SessionObserver obs) { obs.clientDidLogoff(_client); } }); diff --git a/src/java/com/threerings/presents/client/Client.java b/src/java/com/threerings/presents/client/Client.java index bc1c8dd66..e8f55fa19 100644 --- a/src/java/com/threerings/presents/client/Client.java +++ b/src/java/com/threerings/presents/client/Client.java @@ -420,7 +420,7 @@ public class Client // notify our observers immediately _observers.apply(new ObserverOps.Session(this) { - protected void notify (SessionObserver obs) { + @Override protected void notify (SessionObserver obs) { obs.clientWillLogon(_client); } }); @@ -506,7 +506,7 @@ public class Client // if the request is abortable, let's run it past the observers before we act upon it final boolean[] rejected = new boolean[] { false }; _observers.apply(new ObserverOps.Client(this) { - protected void notify (ClientObserver obs) { + @Override protected void notify (ClientObserver obs) { if (!obs.clientWillLogoff(_client)) { rejected[0] = true; } @@ -531,7 +531,7 @@ public class Client _standalone = true; // notify our observers immediately _observers.apply(new ObserverOps.Session(this) { - protected void notify (SessionObserver obs) { + @Override protected void notify (SessionObserver obs) { obs.clientWillLogon(_client); } }); @@ -556,7 +556,7 @@ public class Client public void standaloneLogoff () { notifyObservers(new ObserverOps.Session(this) { - protected void notify (SessionObserver obs) { + @Override protected void notify (SessionObserver obs) { obs.clientDidLogoff(_client); } }); @@ -727,7 +727,7 @@ public class Client protected void reportLogonTribulations (final LogonException cause) { notifyObservers(new ObserverOps.Client(this) { - protected void notify (ClientObserver obs) { + @Override protected void notify (ClientObserver obs) { obs.clientFailedToLogon(_client, cause); } }); @@ -744,7 +744,7 @@ public class Client // let the client know that logon has now fully succeeded notifyObservers(new ObserverOps.Session(this) { - protected void notify (SessionObserver obs) { + @Override protected void notify (SessionObserver obs) { obs.clientDidLogon(_client); } }); @@ -757,7 +757,7 @@ public class Client { // pass the buck onto the listeners notifyObservers(new ObserverOps.Client(this) { - protected void notify (ClientObserver obs) { + @Override protected void notify (ClientObserver obs) { obs.clientFailedToLogon(_client, cause); } }); @@ -773,7 +773,7 @@ public class Client // report to our observers notifyObservers(new ObserverOps.Session(this) { - protected void notify (SessionObserver obs) { + @Override protected void notify (SessionObserver obs) { obs.clientObjectDidChange(_client); } }); @@ -826,7 +826,7 @@ public class Client // immediately try another logon (hopefully with something changed like the server // or port) notifyObservers(new ObserverOps.Client(Client.this) { - protected void notify (ClientObserver obs) { + @Override protected void notify (ClientObserver obs) { if (logonError != null) { obs.clientFailedToLogon(_client, logonError); } else { diff --git a/src/java/com/threerings/presents/dobj/DObject.java b/src/java/com/threerings/presents/dobj/DObject.java index 7ae3dd595..32fd16371 100644 --- a/src/java/com/threerings/presents/dobj/DObject.java +++ b/src/java/com/threerings/presents/dobj/DObject.java @@ -226,8 +226,8 @@ public class DObject if (els != null) { _listeners = els; } else { - log.warning("Refusing repeat listener registration [dobj=" + which() + - ", list=" + listener + "]", new Exception()); + log.warning("Refusing repeat listener registration", + "dobj", which(), "list", listener, new Exception()); } } diff --git a/src/java/com/threerings/presents/peer/server/PeerNode.java b/src/java/com/threerings/presents/peer/server/PeerNode.java index 52b5a144f..b9f959a44 100644 --- a/src/java/com/threerings/presents/peer/server/PeerNode.java +++ b/src/java/com/threerings/presents/peer/server/PeerNode.java @@ -42,7 +42,6 @@ import com.threerings.presents.peer.net.PeerBootstrapData; import com.threerings.presents.peer.server.persist.NodeRecord; import com.threerings.presents.server.PresentsDObjectMgr; import com.threerings.presents.server.net.ConnectionManager; -import com.threerings.presents.server.net.ServerCommunicator; import static com.threerings.presents.Log.log; diff --git a/src/java/com/threerings/presents/server/PresentsDObjectMgr.java b/src/java/com/threerings/presents/server/PresentsDObjectMgr.java index f8c9f54da..c0ee495f6 100644 --- a/src/java/com/threerings/presents/server/PresentsDObjectMgr.java +++ b/src/java/com/threerings/presents/server/PresentsDObjectMgr.java @@ -36,7 +36,6 @@ import com.samskivert.util.Histogram; import com.samskivert.util.IntMap; import com.samskivert.util.IntMaps; import com.samskivert.util.Interval; -import com.samskivert.util.Invoker; import com.samskivert.util.Queue; import com.samskivert.util.RunQueue; import com.samskivert.util.StringUtil; diff --git a/src/java/com/threerings/presents/server/net/Connection.java b/src/java/com/threerings/presents/server/net/Connection.java index 0cadff5fb..14f778e18 100644 --- a/src/java/com/threerings/presents/server/net/Connection.java +++ b/src/java/com/threerings/presents/server/net/Connection.java @@ -28,14 +28,11 @@ import java.security.NoSuchAlgorithmException; import java.io.EOFException; import java.io.IOException; -import java.io.OutputStream; import java.nio.ByteBuffer; import java.nio.channels.SelectionKey; import java.nio.channels.SocketChannel; -import com.samskivert.util.StringUtil; - import com.threerings.io.FramedInputStream; import com.threerings.io.FramingOutputStream; import com.threerings.io.ObjectInputStream; diff --git a/src/java/com/threerings/presents/server/net/ConnectionManager.java b/src/java/com/threerings/presents/server/net/ConnectionManager.java index b96209958..f7f746943 100644 --- a/src/java/com/threerings/presents/server/net/ConnectionManager.java +++ b/src/java/com/threerings/presents/server/net/ConnectionManager.java @@ -61,8 +61,6 @@ import com.threerings.io.UnreliableObjectOutputStream; import com.threerings.presents.annotation.AuthInvoker; import com.threerings.presents.client.Client; import com.threerings.presents.data.ConMgrStats; -import com.threerings.presents.net.AuthRequest; -import com.threerings.presents.net.AuthResponse; import com.threerings.presents.net.Message; import com.threerings.presents.server.Authenticator; import com.threerings.presents.server.ChainedAuthenticator; @@ -335,7 +333,6 @@ public class ConnectionManager extends LoopingThread protected void willStart () { int successes = 0; - IOException failure = null; for (int port : _ports) { try { // create a listening socket and add it to the select set @@ -350,7 +347,6 @@ public class ConnectionManager extends LoopingThread } catch (IOException ioe) { log.warning("Failure listening to socket on port '" + port + "'.", ioe); - failure = ioe; } } diff --git a/src/java/com/threerings/presents/server/net/ServerCommunicator.java b/src/java/com/threerings/presents/server/net/ServerCommunicator.java index 93caa683d..0da0260d7 100644 --- a/src/java/com/threerings/presents/server/net/ServerCommunicator.java +++ b/src/java/com/threerings/presents/server/net/ServerCommunicator.java @@ -77,7 +77,7 @@ public class ServerCommunicator extends Communicator @Override public void networkFailure (final IOException ioe) { notifyClientObservers(new ObserverOps.Client(_client) { - protected void notify (ClientObserver obs) { + @Override protected void notify (ClientObserver obs) { obs.clientConnectionFailed(_client, ioe); } }); @@ -186,7 +186,7 @@ public class ServerCommunicator extends Communicator if (_logonError == null) { // we were logged on successfully, so report didLogoff first notifyClientObservers(new ObserverOps.Session(_client) { - protected void notify (SessionObserver obs) { + @Override protected void notify (SessionObserver obs) { obs.clientDidLogoff(_client); } });