Enhanced debuggery, reenabled new streaming bits because now they should really

really work.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4705 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2007-05-09 01:17:13 +00:00
parent cf949410ce
commit 84855f8fe0
6 changed files with 24 additions and 31 deletions
@@ -87,8 +87,7 @@ public class ObjectInputStream
var cname :String = Translations.getFromServer(jname);
cmap = new ClassMapping(code, cname, streamer);
_classMap[code] = cmap;
if (DEBUG) log.debug(DEBUG_ID +
"Created mapping: (" + code + "): " + cname);
if (DEBUG) log.debug(DEBUG_ID + "Created mapping: (" + code + "): " + cname);
} else {
cmap = (_classMap[code] as ClassMapping);
@@ -96,8 +95,9 @@ public class ObjectInputStream
throw new IOError("Read object for which we have no " +
"registered class metadata [code=" + code + "].");
}
if (DEBUG) log.debug(DEBUG_ID + "Read known code: (" +
code + ": " + cmap.classname + ")");
if (DEBUG) {
log.debug(DEBUG_ID + "Read known code: (" + code + ": " + cmap.classname + ")");
}
}
// log.debug("Creating object sleeve...");
@@ -70,6 +70,10 @@ public class ObjectOutputStream
throw new Error("Too many unique classes written to ObjectOutputStream");
}
if (ObjectInputStream.DEBUG) {
log.debug("Assigning class code [code=" + cmap.code + ", class=" + cname + "].");
}
writeShort(-cmap.code);
writeUTF((streamer == null) ? Translations.getToServer(cname)
: streamer.getJavaClassName());