I'm not sure what's worse, a weird extra constructor for use when
unserializing, or a weird alternative code path in the main constructor when unserializing. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6576 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -89,7 +89,7 @@ public class OccupantInfo extends SimpleStreamableObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** The body object id of this occupant (and our entry key). */
|
/** The body object id of this occupant (and our entry key). */
|
||||||
public final Integer bodyOid;
|
public Integer bodyOid;
|
||||||
|
|
||||||
/** The username of this occupant. */
|
/** The username of this occupant. */
|
||||||
public Name username;
|
public Name username;
|
||||||
@@ -102,9 +102,11 @@ public class OccupantInfo extends SimpleStreamableObject
|
|||||||
*/
|
*/
|
||||||
public OccupantInfo (BodyObject body)
|
public OccupantInfo (BodyObject body)
|
||||||
{
|
{
|
||||||
bodyOid = Integer.valueOf(body.getOid());
|
if (body != null) { // body is null when unserializing
|
||||||
username = body.getVisibleName();
|
bodyOid = Integer.valueOf(body.getOid());
|
||||||
status = body.status;
|
username = body.getVisibleName();
|
||||||
|
status = body.status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Access to the body object id as an int. */
|
/** Access to the body object id as an int. */
|
||||||
|
|||||||
Reference in New Issue
Block a user