From cf949410cecb92a6c64cd05e029978f6f9a561cf Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 9 May 2007 01:15:28 +0000 Subject: [PATCH] We don't need to read and write wrap straight up calls to readObject() and writeObject() as that handles nulls for us (and of course because that's how it's done when streaming using reflection). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4704 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/presents/tools/InstrumentStreamableTask.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/presents/tools/InstrumentStreamableTask.java b/src/java/com/threerings/presents/tools/InstrumentStreamableTask.java index 7f6f85de2..b1e5a4112 100644 --- a/src/java/com/threerings/presents/tools/InstrumentStreamableTask.java +++ b/src/java/com/threerings/presents/tools/InstrumentStreamableTask.java @@ -254,7 +254,8 @@ public class InstrumentStreamableTask extends Task } } - return readWrap(field, name + " = (" + type.getName() + ")ins.readObject();"); + // no need to wrap streamable instances + return (name + " = (" + type.getName() + ")ins.readObject();"); } protected String getFieldWriter (CtField field) @@ -302,7 +303,8 @@ public class InstrumentStreamableTask extends Task } } - return writeWrap(field, "out.writeObject(" + name + ");"); + // no need to wrap streamable instances + return "out.writeObject(" + name + ");"; } protected String readWrap (CtField field, String body)