From 08f6dbefa93fb061032a82646b1d42bc7898b194 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Tue, 8 Mar 2011 01:08:33 +0000 Subject: [PATCH] Comments. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6524 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/main/java/com/threerings/io/Streamer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/threerings/io/Streamer.java b/src/main/java/com/threerings/io/Streamer.java index ce7b410c1..3df099d3b 100644 --- a/src/main/java/com/threerings/io/Streamer.java +++ b/src/main/java/com/threerings/io/Streamer.java @@ -272,7 +272,7 @@ public abstract class Streamer return new ByteEnumStreamer(target); } } - // otherwise, if OLD and not a ByteEnum, stream by name + // otherwise, if by name and not a ByteEnum... if (ENUM_POLICY == EnumPolicy.NAME_WITH_BYTE_ENUM) { return new NameEnumStreamer(target); @@ -474,6 +474,9 @@ public abstract class Streamer protected CustomClassStreamer (Class target, Method reader, Method writer) { super(target, false); // we will lazy-initialize the marshallers only if needed + // (It's possible there is only a writer method, but the object is never read + // from clients, so don't get cute and set up the marshallers now if one of the + // methods is null). _reader = reader; _writer = writer; }