Nixement of ze redundant casts.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@601 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2008-05-22 12:08:27 +00:00
parent ea6f8ffa1f
commit ae6c542271
6 changed files with 12 additions and 18 deletions
@@ -85,8 +85,7 @@ public class LobbySelector extends JPanel
super.addNotify(); super.addNotify();
// get a handle on our lobby service instance // get a handle on our lobby service instance
_lservice = (LobbyService) _lservice = _ctx.getClient().requireService(LobbyService.class);
_ctx.getClient().requireService(LobbyService.class);
// and use them to look up the lobby categories // and use them to look up the lobby categories
_lservice.getCategories(_ctx.getClient(), this); _lservice.getCategories(_ctx.getClient(), this);
} }
@@ -100,22 +100,17 @@ public class SimulatorController extends Controller
GameConfig config = null; GameConfig config = null;
try { try {
// create the game config object // create the game config object
config = (GameConfig) config = (GameConfig)Class.forName(_info.gameConfigClass).newInstance();
Class.forName(_info.gameConfigClass).newInstance();
// get the simulator service and use it to request that our // get the simulator service and use it to request that our game be created
// game be created SimulatorService sservice = client.requireService(SimulatorService.class);
SimulatorService sservice = (SimulatorService) sservice.createGame(client, config, _info.simClass, _info.playerCount);
client.requireService(SimulatorService.class);
sservice.createGame(
client, config, _info.simClass, _info.playerCount);
// our work here is done, as the location manager will move us // our work here is done, as the location manager will move us into the game room
// into the game room straightaway // straightaway
} catch (Exception e) { } catch (Exception e) {
Log.warning("Failed to instantiate game config " + Log.warning("Failed to instantiate game config [class=" + _info.gameConfigClass +
"[class=" + _info.gameConfigClass +
", error=" + e + "]."); ", error=" + e + "].");
} }
} }
@@ -198,7 +198,7 @@ public class ParlorDirector extends BasicDirector
protected void fetchServices (Client client) protected void fetchServices (Client client)
{ {
// get a handle on our parlor services // get a handle on our parlor services
_pservice = (ParlorService)client.requireService(ParlorService.class); _pservice = client.requireService(ParlorService.class);
} }
/** /**
@@ -509,7 +509,7 @@ public class SceneDirector extends BasicDirector
protected void fetchServices (Client client) protected void fetchServices (Client client)
{ {
// get a handle on our scene service // get a handle on our scene service
_sservice = (SceneService)client.requireService(SceneService.class); _sservice = client.requireService(SceneService.class);
} }
/** Access to general client services. */ /** Access to general client services. */
@@ -392,7 +392,7 @@ public class SpotSceneDirector extends BasicDirector
// documentation inherited // documentation inherited
protected void fetchServices (Client client) protected void fetchServices (Client client)
{ {
_sservice = (SpotService)client.requireService(SpotService.class); _sservice = client.requireService(SpotService.class);
} }
/** /**
@@ -150,7 +150,7 @@ public class ZoneDirector extends BasicDirector
// documentation inherited // documentation inherited
protected void fetchServices (Client client) protected void fetchServices (Client client)
{ {
_zservice = (ZoneService)client.requireService(ZoneService.class); _zservice = client.requireService(ZoneService.class);
} }
// documentation inherited // documentation inherited