diff --git a/src/java/com/threerings/presents/dobj/CompoundEvent.java b/src/java/com/threerings/presents/dobj/CompoundEvent.java index 85ead2fac..16230ccbe 100644 --- a/src/java/com/threerings/presents/dobj/CompoundEvent.java +++ b/src/java/com/threerings/presents/dobj/CompoundEvent.java @@ -58,7 +58,7 @@ public class CompoundEvent extends DEvent _omgr = omgr; _target = target; - _events = new StreamableArrayList(); + _events = StreamableArrayList.newList(); } /** diff --git a/src/java/com/threerings/util/StreamableArrayList.java b/src/java/com/threerings/util/StreamableArrayList.java index 4e5051b14..69dd9175c 100644 --- a/src/java/com/threerings/util/StreamableArrayList.java +++ b/src/java/com/threerings/util/StreamableArrayList.java @@ -39,6 +39,14 @@ import com.threerings.io.Streamable; public class StreamableArrayList extends ArrayList implements Streamable { + /** + * Creates an empty StreamableArrayList. + */ + public static StreamableArrayList newList () + { + return new StreamableArrayList(); + } + /** * Writes our custom streamable fields. */ diff --git a/src/java/com/threerings/util/StreamableHashSet.java b/src/java/com/threerings/util/StreamableHashSet.java index b77958cc6..96811630e 100644 --- a/src/java/com/threerings/util/StreamableHashSet.java +++ b/src/java/com/threerings/util/StreamableHashSet.java @@ -40,8 +40,15 @@ public class StreamableHashSet extends HashSet implements Streamable { /** - * Constructs an empty hash set with the specified number of hash - * buckets. + * Creates an empty StreamableHashSet with the default number of hash buckets. + */ + public static StreamableHashSet newSet () + { + return new StreamableHashSet(); + } + + /** + * Constructs an empty hash set with the specified number of hash buckets. */ public StreamableHashSet (int buckets, float loadFactor) {