Use the valueOf factory methods pretty much everywhere.

These are the preferred way to get instances of Boolean, Byte,
Short, Character, Integer, Long, Float, and Double object.
It's always made sense for Boolean objects, and with 1.5 these factory
methods were blessed as the proper way to get instances unless one
absolutely needed a distinct object.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4145 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-05-24 01:24:24 +00:00
parent c143e93554
commit 26c928fc45
100 changed files with 196 additions and 162 deletions
@@ -2,7 +2,7 @@
// $Id$
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2005 Three Rings Design, Inc., All Rights Reserved
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
// http://www.threerings.net/code/narya/
//
// This library is free software; you can redistribute it and/or modify it
@@ -64,6 +64,7 @@ public class BodyDispatcher extends InvocationDispatcher
default:
super.dispatchRequest(source, methodId, args);
return;
}
}
}
@@ -2,7 +2,7 @@
// $Id$
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2005 Three Rings Design, Inc., All Rights Reserved
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
// http://www.threerings.net/code/narya/
//
// This library is free software; you can redistribute it and/or modify it
@@ -71,6 +71,7 @@ public class LocationDispatcher extends InvocationDispatcher
default:
super.dispatchRequest(source, methodId, args);
return;
}
}
}
@@ -194,7 +194,7 @@ public class LocationProvider
try {
PlaceObject pold = (PlaceObject)_omgr.getObject(oldloc);
if (pold != null) {
Integer key = new Integer(bodoid);
Integer key = Integer.valueOf(bodoid);
pold.startTransaction();
try {
// remove their occupant info (which is keyed on oid)
@@ -41,7 +41,7 @@ public class LocationSender extends InvocationSender
{
sendNotification(
target, LocationDecoder.RECEIVER_CODE, LocationDecoder.FORCED_MOVE,
new Object[] { new Integer(arg1) });
new Object[] { Integer.valueOf(arg1) });
}
}
@@ -446,7 +446,7 @@ public class PlaceManager
// if their occupant info hasn't been removed (which may be the
// case if they logged off rather than left via a MoveTo request),
// we need to get it on out of here
Integer key = new Integer(bodyOid);
Integer key = Integer.valueOf(bodyOid);
if (_plobj.occupantInfo.containsKey(key)) {
_plobj.removeFromOccupantInfo(key);
}