From 3b86a9c669d19bd9a66eaa9ac0db1ee37c36a5af Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sat, 21 Dec 2002 00:44:25 +0000 Subject: [PATCH] Support implicit Object[] handling as well as Object handling. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2081 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/io/FieldMarshaller.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/java/com/threerings/io/FieldMarshaller.java b/src/java/com/threerings/io/FieldMarshaller.java index ea5a9f6b1..56812338b 100644 --- a/src/java/com/threerings/io/FieldMarshaller.java +++ b/src/java/com/threerings/io/FieldMarshaller.java @@ -1,5 +1,5 @@ // -// $Id: FieldMarshaller.java,v 1.3 2002/12/20 23:27:52 mdb Exp $ +// $Id: FieldMarshaller.java,v 1.4 2002/12/21 00:44:25 mdb Exp $ package com.threerings.io; @@ -121,11 +121,12 @@ public abstract class FieldMarshaller _marshallers.put(Streamable.class, gmarsh); // use the same generic marshaller for fields declared to by type - // Object with the expectation that they will contain only - // primitive types or Streamables; the runtime will fail + // Object or Object[] with the expectation that they will contain + // only primitive types or Streamables; the runtime will fail // informatively if the user attempts to store non-Streamable // objects in that field _marshallers.put(Object.class, gmarsh); + _marshallers.put((new Object[0]).getClass(), gmarsh); // create marshallers for the primitive types _marshallers.put(Boolean.TYPE, new FieldMarshaller() {