From ef748636e25f9b889ed7d3e62c9fe6e4e38d5384 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 25 Feb 2004 14:41:47 +0000 Subject: [PATCH] Various Eclipse suggested bits. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2969 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/crowd/Log.java | 5 +++-- .../com/threerings/crowd/chat/client/ChatDirector.java | 8 +++++--- .../com/threerings/crowd/chat/data/ChatMarshaller.java | 4 +--- .../com/threerings/crowd/chat/data/SpeakMarshaller.java | 3 +-- .../com/threerings/crowd/chat/server/ChatDispatcher.java | 4 +--- .../com/threerings/crowd/chat/server/ChatProvider.java | 7 +++---- .../com/threerings/crowd/chat/server/SpeakDispatcher.java | 4 +--- .../com/threerings/crowd/chat/server/SpeakProvider.java | 3 +-- .../com/threerings/crowd/client/LocationDirector.java | 6 +----- src/java/com/threerings/crowd/client/LocationService.java | 3 +-- src/java/com/threerings/crowd/data/BodyMarshaller.java | 3 +-- .../com/threerings/crowd/data/LocationMarshaller.java | 5 ++--- src/java/com/threerings/crowd/data/PlaceConfig.java | 3 +-- src/java/com/threerings/crowd/server/BodyDispatcher.java | 4 +--- src/java/com/threerings/crowd/server/BodyProvider.java | 3 +-- src/java/com/threerings/crowd/server/CrowdClient.java | 4 +--- .../com/threerings/crowd/server/LocationDispatcher.java | 7 ++----- .../com/threerings/crowd/server/LocationProvider.java | 3 +-- src/java/com/threerings/crowd/server/LocationSender.java | 5 ++--- src/java/com/threerings/crowd/server/PlaceManager.java | 3 +-- 20 files changed, 31 insertions(+), 56 deletions(-) diff --git a/src/java/com/threerings/crowd/Log.java b/src/java/com/threerings/crowd/Log.java index 6ab78b001..819c21484 100644 --- a/src/java/com/threerings/crowd/Log.java +++ b/src/java/com/threerings/crowd/Log.java @@ -1,5 +1,5 @@ // -// $Id: Log.java,v 1.3 2003/09/22 23:59:39 mdb Exp $ +// $Id: Log.java,v 1.4 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd; @@ -15,7 +15,8 @@ public class Log /** Convenience function. */ public static boolean debug () { - return log.getLevel() == com.samskivert.util.Log.DEBUG; + return (com.samskivert.util.Log.getLevel() == + com.samskivert.util.Log.DEBUG); } /** Convenience function. */ diff --git a/src/java/com/threerings/crowd/chat/client/ChatDirector.java b/src/java/com/threerings/crowd/chat/client/ChatDirector.java index 2b2409aed..51ecb00cf 100644 --- a/src/java/com/threerings/crowd/chat/client/ChatDirector.java +++ b/src/java/com/threerings/crowd/chat/client/ChatDirector.java @@ -1,5 +1,5 @@ // -// $Id: ChatDirector.java,v 1.56 2003/12/03 23:38:45 mdb Exp $ +// $Id: ChatDirector.java,v 1.57 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.chat.client; @@ -609,8 +609,10 @@ public class ChatDirector extends BasicDirector super.clientDidLogoff(client); // stop listening to it for tells - removeAuxiliarySource(_clobj); - _clobj = null; + if (_clobj != null) { + removeAuxiliarySource(_clobj); + _clobj = null; + } clearDisplays(); diff --git a/src/java/com/threerings/crowd/chat/data/ChatMarshaller.java b/src/java/com/threerings/crowd/chat/data/ChatMarshaller.java index 8857e6ee3..8d7292a62 100644 --- a/src/java/com/threerings/crowd/chat/data/ChatMarshaller.java +++ b/src/java/com/threerings/crowd/chat/data/ChatMarshaller.java @@ -1,12 +1,10 @@ // -// $Id: ChatMarshaller.java,v 1.6 2003/09/18 17:53:48 mdb Exp $ +// $Id: ChatMarshaller.java,v 1.7 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.chat.data; import com.threerings.crowd.chat.client.ChatService; -import com.threerings.crowd.chat.client.ChatService.TellListener; import com.threerings.presents.client.Client; -import com.threerings.presents.client.InvocationService.InvocationListener; import com.threerings.presents.data.InvocationMarshaller; import com.threerings.presents.dobj.InvocationResponseEvent; diff --git a/src/java/com/threerings/crowd/chat/data/SpeakMarshaller.java b/src/java/com/threerings/crowd/chat/data/SpeakMarshaller.java index 264618018..802cff61d 100644 --- a/src/java/com/threerings/crowd/chat/data/SpeakMarshaller.java +++ b/src/java/com/threerings/crowd/chat/data/SpeakMarshaller.java @@ -1,12 +1,11 @@ // -// $Id: SpeakMarshaller.java,v 1.3 2003/06/03 21:41:33 ray Exp $ +// $Id: SpeakMarshaller.java,v 1.4 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.chat.data; import com.threerings.crowd.chat.client.SpeakService; import com.threerings.presents.client.Client; import com.threerings.presents.data.InvocationMarshaller; -import com.threerings.presents.dobj.InvocationResponseEvent; /** * Provides the implementation of the {@link SpeakService} interface diff --git a/src/java/com/threerings/crowd/chat/server/ChatDispatcher.java b/src/java/com/threerings/crowd/chat/server/ChatDispatcher.java index 68a74f5ee..3c89c847c 100644 --- a/src/java/com/threerings/crowd/chat/server/ChatDispatcher.java +++ b/src/java/com/threerings/crowd/chat/server/ChatDispatcher.java @@ -1,12 +1,10 @@ // -// $Id: ChatDispatcher.java,v 1.6 2003/09/18 17:53:48 mdb Exp $ +// $Id: ChatDispatcher.java,v 1.7 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.chat.server; -import com.threerings.crowd.chat.client.ChatService; import com.threerings.crowd.chat.client.ChatService.TellListener; import com.threerings.crowd.chat.data.ChatMarshaller; -import com.threerings.presents.client.Client; import com.threerings.presents.client.InvocationService.InvocationListener; import com.threerings.presents.data.ClientObject; import com.threerings.presents.data.InvocationMarshaller; diff --git a/src/java/com/threerings/crowd/chat/server/ChatProvider.java b/src/java/com/threerings/crowd/chat/server/ChatProvider.java index 0408624b8..baffcc1b3 100644 --- a/src/java/com/threerings/crowd/chat/server/ChatProvider.java +++ b/src/java/com/threerings/crowd/chat/server/ChatProvider.java @@ -1,5 +1,5 @@ // -// $Id: ChatProvider.java,v 1.25 2003/09/18 17:53:48 mdb Exp $ +// $Id: ChatProvider.java,v 1.26 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.chat.server; @@ -12,16 +12,15 @@ import com.threerings.util.TimeUtil; import com.threerings.presents.client.InvocationService.InvocationListener; import com.threerings.presents.data.ClientObject; import com.threerings.presents.dobj.DObjectManager; -import com.threerings.presents.dobj.MessageEvent; import com.threerings.presents.server.InvocationException; import com.threerings.presents.server.InvocationManager; import com.threerings.presents.server.InvocationProvider; -import com.threerings.crowd.Log; import com.threerings.crowd.data.BodyObject; import com.threerings.crowd.data.OccupantInfo; import com.threerings.crowd.data.PlaceObject; +import com.threerings.crowd.server.AccessControl; import com.threerings.crowd.server.CrowdServer; import com.threerings.crowd.chat.client.ChatService.TellListener; @@ -139,7 +138,7 @@ public class ChatProvider // make sure the requesting user has broadcast privileges if (!CrowdServer.actrl.checkAccess(body, BROADCAST_TOKEN)) { - throw new InvocationException(CrowdServer.actrl.LACK_ACCESS); + throw new InvocationException(AccessControl.LACK_ACCESS); } Iterator iter = CrowdServer.plreg.enumeratePlaces(); diff --git a/src/java/com/threerings/crowd/chat/server/SpeakDispatcher.java b/src/java/com/threerings/crowd/chat/server/SpeakDispatcher.java index d3166569a..8c0cb64f4 100644 --- a/src/java/com/threerings/crowd/chat/server/SpeakDispatcher.java +++ b/src/java/com/threerings/crowd/chat/server/SpeakDispatcher.java @@ -1,11 +1,9 @@ // -// $Id: SpeakDispatcher.java,v 1.3 2003/06/03 21:41:33 ray Exp $ +// $Id: SpeakDispatcher.java,v 1.4 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.chat.server; -import com.threerings.crowd.chat.client.SpeakService; import com.threerings.crowd.chat.data.SpeakMarshaller; -import com.threerings.presents.client.Client; import com.threerings.presents.data.ClientObject; import com.threerings.presents.data.InvocationMarshaller; import com.threerings.presents.server.InvocationDispatcher; diff --git a/src/java/com/threerings/crowd/chat/server/SpeakProvider.java b/src/java/com/threerings/crowd/chat/server/SpeakProvider.java index 80fb41bad..2c7d5bd1b 100644 --- a/src/java/com/threerings/crowd/chat/server/SpeakProvider.java +++ b/src/java/com/threerings/crowd/chat/server/SpeakProvider.java @@ -1,5 +1,5 @@ // -// $Id: SpeakProvider.java,v 1.18 2003/12/09 21:01:43 mdb Exp $ +// $Id: SpeakProvider.java,v 1.19 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.chat.server; @@ -10,7 +10,6 @@ import com.samskivert.util.ObserverList; import com.threerings.presents.data.ClientObject; import com.threerings.presents.dobj.DObject; -import com.threerings.presents.dobj.MessageEvent; import com.threerings.presents.server.InvocationProvider; import com.threerings.crowd.Log; diff --git a/src/java/com/threerings/crowd/client/LocationDirector.java b/src/java/com/threerings/crowd/client/LocationDirector.java index 7d7e8b749..e5bc76e79 100644 --- a/src/java/com/threerings/crowd/client/LocationDirector.java +++ b/src/java/com/threerings/crowd/client/LocationDirector.java @@ -1,11 +1,8 @@ // -// $Id: LocationDirector.java,v 1.31 2003/10/03 20:41:31 mdb Exp $ +// $Id: LocationDirector.java,v 1.32 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.client; -import java.util.ArrayList; -import java.util.List; - import com.samskivert.util.ObserverList; import com.samskivert.util.ObserverList.ObserverOp; import com.samskivert.util.ResultListener; @@ -14,7 +11,6 @@ import com.threerings.presents.client.BasicDirector; import com.threerings.presents.client.Client; import com.threerings.presents.dobj.DObject; -import com.threerings.presents.dobj.DObjectManager; import com.threerings.presents.dobj.ObjectAccessException; import com.threerings.presents.dobj.Subscriber; diff --git a/src/java/com/threerings/crowd/client/LocationService.java b/src/java/com/threerings/crowd/client/LocationService.java index 9f625f306..80e765a62 100644 --- a/src/java/com/threerings/crowd/client/LocationService.java +++ b/src/java/com/threerings/crowd/client/LocationService.java @@ -1,12 +1,11 @@ // -// $Id: LocationService.java,v 1.7 2002/08/14 19:07:49 mdb Exp $ +// $Id: LocationService.java,v 1.8 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.client; import com.threerings.presents.client.Client; import com.threerings.presents.client.InvocationService; -import com.threerings.crowd.Log; import com.threerings.crowd.data.PlaceConfig; /** diff --git a/src/java/com/threerings/crowd/data/BodyMarshaller.java b/src/java/com/threerings/crowd/data/BodyMarshaller.java index f14e8077a..08a211e98 100644 --- a/src/java/com/threerings/crowd/data/BodyMarshaller.java +++ b/src/java/com/threerings/crowd/data/BodyMarshaller.java @@ -1,12 +1,11 @@ // -// $Id: BodyMarshaller.java,v 1.2 2003/06/03 21:41:33 ray Exp $ +// $Id: BodyMarshaller.java,v 1.3 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.data; import com.threerings.crowd.client.BodyService; import com.threerings.presents.client.Client; import com.threerings.presents.data.InvocationMarshaller; -import com.threerings.presents.dobj.InvocationResponseEvent; /** * Provides the implementation of the {@link BodyService} interface diff --git a/src/java/com/threerings/crowd/data/LocationMarshaller.java b/src/java/com/threerings/crowd/data/LocationMarshaller.java index dda9ea094..c6b98f198 100644 --- a/src/java/com/threerings/crowd/data/LocationMarshaller.java +++ b/src/java/com/threerings/crowd/data/LocationMarshaller.java @@ -1,10 +1,9 @@ // -// $Id: LocationMarshaller.java,v 1.2 2002/08/20 19:38:14 mdb Exp $ +// $Id: LocationMarshaller.java,v 1.3 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.data; import com.threerings.crowd.client.LocationService; -import com.threerings.crowd.client.LocationService.MoveListener; import com.threerings.crowd.data.PlaceConfig; import com.threerings.presents.client.Client; import com.threerings.presents.data.InvocationMarshaller; @@ -18,7 +17,7 @@ import com.threerings.presents.dobj.InvocationResponseEvent; * to the requesting client. * *

Generated from - * $Id: LocationMarshaller.java,v 1.2 2002/08/20 19:38:14 mdb Exp $ + * $Id: LocationMarshaller.java,v 1.3 2004/02/25 14:41:47 mdb Exp $ * */ public class LocationMarshaller extends InvocationMarshaller diff --git a/src/java/com/threerings/crowd/data/PlaceConfig.java b/src/java/com/threerings/crowd/data/PlaceConfig.java index 2bcef323e..5e396ed1b 100644 --- a/src/java/com/threerings/crowd/data/PlaceConfig.java +++ b/src/java/com/threerings/crowd/data/PlaceConfig.java @@ -1,12 +1,11 @@ // -// $Id: PlaceConfig.java,v 1.5 2003/02/11 06:00:51 mdb Exp $ +// $Id: PlaceConfig.java,v 1.6 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.data; import com.samskivert.util.StringUtil; import com.threerings.io.SimpleStreamableObject; -import com.threerings.crowd.client.PlaceController; /** * The place config class encapsulates the configuration information for a diff --git a/src/java/com/threerings/crowd/server/BodyDispatcher.java b/src/java/com/threerings/crowd/server/BodyDispatcher.java index 1e4b4e923..6eebe9dab 100644 --- a/src/java/com/threerings/crowd/server/BodyDispatcher.java +++ b/src/java/com/threerings/crowd/server/BodyDispatcher.java @@ -1,11 +1,9 @@ // -// $Id: BodyDispatcher.java,v 1.2 2003/06/03 21:41:33 ray Exp $ +// $Id: BodyDispatcher.java,v 1.3 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.server; -import com.threerings.crowd.client.BodyService; import com.threerings.crowd.data.BodyMarshaller; -import com.threerings.presents.client.Client; import com.threerings.presents.data.ClientObject; import com.threerings.presents.data.InvocationMarshaller; import com.threerings.presents.server.InvocationDispatcher; diff --git a/src/java/com/threerings/crowd/server/BodyProvider.java b/src/java/com/threerings/crowd/server/BodyProvider.java index 0d36b0ff5..fc49c9e45 100644 --- a/src/java/com/threerings/crowd/server/BodyProvider.java +++ b/src/java/com/threerings/crowd/server/BodyProvider.java @@ -1,5 +1,5 @@ // -// $Id: BodyProvider.java,v 1.6 2003/09/11 03:20:06 mdb Exp $ +// $Id: BodyProvider.java,v 1.7 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.server; @@ -11,7 +11,6 @@ import com.threerings.presents.server.InvocationProvider; import com.threerings.crowd.Log; import com.threerings.crowd.data.BodyObject; import com.threerings.crowd.data.OccupantInfo; -import com.threerings.crowd.data.PlaceObject; /** * Provides the server-side side of the body-related invocation services. diff --git a/src/java/com/threerings/crowd/server/CrowdClient.java b/src/java/com/threerings/crowd/server/CrowdClient.java index 035721c58..f344f201b 100644 --- a/src/java/com/threerings/crowd/server/CrowdClient.java +++ b/src/java/com/threerings/crowd/server/CrowdClient.java @@ -1,16 +1,14 @@ // -// $Id: CrowdClient.java,v 1.23 2003/06/14 00:47:16 mdb Exp $ +// $Id: CrowdClient.java,v 1.24 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.server; -import com.threerings.presents.data.ClientObject; import com.threerings.presents.server.PresentsClient; import com.threerings.crowd.Log; import com.threerings.crowd.chat.server.SpeakProvider; import com.threerings.crowd.data.BodyObject; import com.threerings.crowd.data.OccupantInfo; -import com.threerings.crowd.data.PlaceObject; import com.threerings.crowd.server.CrowdServer; /** diff --git a/src/java/com/threerings/crowd/server/LocationDispatcher.java b/src/java/com/threerings/crowd/server/LocationDispatcher.java index 4ad06a94a..1776d97c9 100644 --- a/src/java/com/threerings/crowd/server/LocationDispatcher.java +++ b/src/java/com/threerings/crowd/server/LocationDispatcher.java @@ -1,13 +1,10 @@ // -// $Id: LocationDispatcher.java,v 1.2 2002/08/20 19:38:14 mdb Exp $ +// $Id: LocationDispatcher.java,v 1.3 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.server; -import com.threerings.crowd.client.LocationService; import com.threerings.crowd.client.LocationService.MoveListener; import com.threerings.crowd.data.LocationMarshaller; -import com.threerings.crowd.data.PlaceConfig; -import com.threerings.presents.client.Client; import com.threerings.presents.data.ClientObject; import com.threerings.presents.data.InvocationMarshaller; import com.threerings.presents.server.InvocationDispatcher; @@ -17,7 +14,7 @@ import com.threerings.presents.server.InvocationException; * Dispatches requests to the {@link LocationProvider}. * *

Generated from - * $Id: LocationDispatcher.java,v 1.2 2002/08/20 19:38:14 mdb Exp $ + * $Id: LocationDispatcher.java,v 1.3 2004/02/25 14:41:47 mdb Exp $ * */ public class LocationDispatcher extends InvocationDispatcher diff --git a/src/java/com/threerings/crowd/server/LocationProvider.java b/src/java/com/threerings/crowd/server/LocationProvider.java index 45d88f592..e737bd022 100644 --- a/src/java/com/threerings/crowd/server/LocationProvider.java +++ b/src/java/com/threerings/crowd/server/LocationProvider.java @@ -1,5 +1,5 @@ // -// $Id: LocationProvider.java,v 1.21 2003/08/09 04:58:25 mdb Exp $ +// $Id: LocationProvider.java,v 1.22 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.server; @@ -16,7 +16,6 @@ import com.threerings.crowd.client.LocationService; import com.threerings.crowd.data.BodyObject; import com.threerings.crowd.data.LocationCodes; -import com.threerings.crowd.data.OccupantInfo; import com.threerings.crowd.data.PlaceConfig; import com.threerings.crowd.data.PlaceObject; diff --git a/src/java/com/threerings/crowd/server/LocationSender.java b/src/java/com/threerings/crowd/server/LocationSender.java index 8b978eaa1..64d9be098 100644 --- a/src/java/com/threerings/crowd/server/LocationSender.java +++ b/src/java/com/threerings/crowd/server/LocationSender.java @@ -1,10 +1,9 @@ // -// $Id: LocationSender.java,v 1.2 2002/08/20 19:38:14 mdb Exp $ +// $Id: LocationSender.java,v 1.3 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.server; import com.threerings.crowd.client.LocationDecoder; -import com.threerings.crowd.client.LocationReceiver; import com.threerings.presents.data.ClientObject; import com.threerings.presents.server.InvocationSender; @@ -13,7 +12,7 @@ import com.threerings.presents.server.InvocationSender; * client. * *

Generated from - * $Id: LocationSender.java,v 1.2 2002/08/20 19:38:14 mdb Exp $ + * $Id: LocationSender.java,v 1.3 2004/02/25 14:41:47 mdb Exp $ * */ public class LocationSender extends InvocationSender diff --git a/src/java/com/threerings/crowd/server/PlaceManager.java b/src/java/com/threerings/crowd/server/PlaceManager.java index 975df616d..ed9eb1475 100644 --- a/src/java/com/threerings/crowd/server/PlaceManager.java +++ b/src/java/com/threerings/crowd/server/PlaceManager.java @@ -1,12 +1,11 @@ // -// $Id: PlaceManager.java,v 1.49 2004/01/11 17:43:12 ray Exp $ +// $Id: PlaceManager.java,v 1.50 2004/02/25 14:41:47 mdb Exp $ package com.threerings.crowd.server; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; -import java.util.Properties; import com.samskivert.util.HashIntMap; import com.samskivert.util.IntervalManager;