From dde4e4bfdff78e14bd6f119b5175d1ac8bc34262 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 22 Jul 2008 15:06:36 +0000 Subject: [PATCH] Presents supports streaming lists natively now, so just use an array list. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5254 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/presents/net/BootstrapData.java | 5 +++-- .../com/threerings/presents/server/PresentsClient.java | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/presents/net/BootstrapData.java b/src/java/com/threerings/presents/net/BootstrapData.java index 1610622a4..02fbe6daa 100644 --- a/src/java/com/threerings/presents/net/BootstrapData.java +++ b/src/java/com/threerings/presents/net/BootstrapData.java @@ -21,8 +21,9 @@ package com.threerings.presents.net; +import java.util.List; + import com.threerings.io.SimpleStreamableObject; -import com.threerings.util.StreamableArrayList; import com.threerings.presents.data.InvocationMarshaller; @@ -40,5 +41,5 @@ public class BootstrapData extends SimpleStreamableObject public int clientOid; /** A list of handles to invocation services. */ - public StreamableArrayList services; + public List services; } diff --git a/src/java/com/threerings/presents/server/PresentsClient.java b/src/java/com/threerings/presents/server/PresentsClient.java index 889a7f154..05f98cdba 100644 --- a/src/java/com/threerings/presents/server/PresentsClient.java +++ b/src/java/com/threerings/presents/server/PresentsClient.java @@ -26,13 +26,14 @@ import java.net.InetAddress; import java.util.Map; import java.util.TimeZone; +import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.inject.Inject; + import com.samskivert.util.HashIntMap; import com.samskivert.util.ResultListener; import com.samskivert.util.Throttle; import com.threerings.util.Name; -import com.threerings.util.StreamableArrayList; import com.threerings.presents.data.ClientObject; import com.threerings.presents.data.InvocationMarshaller; @@ -676,11 +677,11 @@ public class PresentsClient data.clientOid = _clobj.getOid(); // fill in the list of bootstrap services - data.services = new StreamableArrayList(); if (_areq.getBootGroups() == null) { log.warning("Client provided no invocation service boot groups? " + this); + data.services = Lists.newArrayList(); } else { - data.services.addAll(_invmgr.getBootstrapServices(_areq.getBootGroups())); + data.services = _invmgr.getBootstrapServices(_areq.getBootGroups()); } }