405 modified source files and 17,367 lines of diffs later we now enforce

more discipline when handling names in our code base. Any user entered
name should find its way into a Name object as soon as it comes out of a
text field or whatnot, and stay that way until it makes its way into a
text field or into a database record (for which String objects are vastly
simpler because of JORA magic).

Dear God, let me never again make a change this large for the rest of my
mortal life.

Unfortunately, this means we have to keep an eye out for funny business
pretty much everywhere. However, since we will absolutely want to test
market stalls and so forth on Azure, we'll have an opportunity to iron out
any funny business that might fall under the radar during our internal
testing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2980 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2004-03-06 11:29:19 +00:00
parent 92b716d790
commit 32dee3cbaf
58 changed files with 335 additions and 286 deletions
@@ -1,5 +1,5 @@
//
// $Id: ParlorDispatcher.java,v 1.2 2002/08/20 19:38:14 mdb Exp $
// $Id: ParlorDispatcher.java,v 1.3 2004/03/06 11:29:19 mdb Exp $
package com.threerings.parlor.server;
@@ -14,13 +14,10 @@ import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.server.InvocationDispatcher;
import com.threerings.presents.server.InvocationException;
import com.threerings.util.Name;
/**
* Dispatches requests to the {@link ParlorProvider}.
*
* <p> Generated from <code>
* $Id: ParlorDispatcher.java,v 1.2 2002/08/20 19:38:14 mdb Exp $
* </code>
*/
public class ParlorDispatcher extends InvocationDispatcher
{
@@ -48,7 +45,7 @@ public class ParlorDispatcher extends InvocationDispatcher
case ParlorMarshaller.INVITE:
((ParlorProvider)provider).invite(
source,
(String)args[0], (GameConfig)args[1], (InviteListener)args[2]
(Name)args[0], (GameConfig)args[1], (InviteListener)args[2]
);
return;
@@ -1,9 +1,10 @@
//
// $Id: ParlorManager.java,v 1.20 2002/10/06 00:53:15 mdb Exp $
// $Id: ParlorManager.java,v 1.21 2004/03/06 11:29:19 mdb Exp $
package com.threerings.parlor.server;
import com.samskivert.util.HashIntMap;
import com.threerings.util.Name;
import com.threerings.presents.server.InvocationException;
import com.threerings.presents.server.InvocationManager;
@@ -183,7 +184,7 @@ public class ParlorManager
Log.info("Creating game manager [invite=" + invite + "].");
// configure the game config with the player info
invite.config.players = new String[] {
invite.config.players = new Name[] {
invite.invitee.username, invite.inviter.username };
// create the game manager and begin it's initialization
@@ -1,8 +1,10 @@
//
// $Id: ParlorProvider.java,v 1.13 2002/08/14 19:07:54 mdb Exp $
// $Id: ParlorProvider.java,v 1.14 2004/03/06 11:29:19 mdb Exp $
package com.threerings.parlor.server;
import com.threerings.util.Name;
import com.threerings.presents.client.InvocationService.InvocationListener;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.server.InvocationException;
@@ -44,7 +46,7 @@ public class ParlorProvider
* Processes a request from the client to invite another user to play
* a game.
*/
public void invite (ClientObject caller, String invitee,
public void invite (ClientObject caller, Name invitee,
GameConfig config, InviteListener listener)
throws InvocationException
{
@@ -1,5 +1,5 @@
//
// $Id: ParlorSender.java,v 1.2 2002/08/20 19:38:14 mdb Exp $
// $Id: ParlorSender.java,v 1.3 2004/03/06 11:29:19 mdb Exp $
package com.threerings.parlor.server;
@@ -8,14 +8,11 @@ import com.threerings.parlor.client.ParlorReceiver;
import com.threerings.parlor.game.GameConfig;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.server.InvocationSender;
import com.threerings.util.Name;
/**
* Used to issue notifications to a {@link ParlorReceiver} instance on a
* client.
*
* <p> Generated from <code>
* $Id: ParlorSender.java,v 1.2 2002/08/20 19:38:14 mdb Exp $
* </code>
*/
public class ParlorSender extends InvocationSender
{
@@ -36,7 +33,7 @@ public class ParlorSender extends InvocationSender
* ParlorReceiver#receivedInvite} on a client.
*/
public static void sendInvite (
ClientObject target, int arg1, String arg2, GameConfig arg3)
ClientObject target, int arg1, Name arg2, GameConfig arg3)
{
sendNotification(
target, ParlorDecoder.RECEIVER_CODE, ParlorDecoder.RECEIVED_INVITE,
@@ -67,5 +64,4 @@ public class ParlorSender extends InvocationSender
new Object[] { new Integer(arg1) });
}
// Generated on 12:37:00 08/20/02.
}
@@ -1,5 +1,5 @@
//
// $Id: TableManager.java,v 1.9 2003/03/27 23:45:04 mdb Exp $
// $Id: TableManager.java,v 1.10 2004/03/06 11:29:19 mdb Exp $
package com.threerings.parlor.server;
@@ -8,6 +8,7 @@ import java.util.Iterator;
import com.samskivert.util.HashIntMap;
import com.samskivert.util.StringUtil;
import com.threerings.util.Name;
import com.threerings.presents.dobj.ObjectAddedEvent;
import com.threerings.presents.dobj.ObjectDeathListener;
@@ -254,8 +255,7 @@ public class TableManager
* @return a reference to the newly created game manager or null if
* something choked during the creation or initialization process.
*/
protected GameManager createGameManager (
GameConfig config, String[] players)
protected GameManager createGameManager (GameConfig config, Name[] players)
{
GameManager gmgr = null;