From 164d746072ad4dc27d3ab7687bab4d6ef824d869 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 10 May 2006 21:11:56 +0000 Subject: [PATCH] Turns out they did fix the describeType bugs, but also changed the format of the output. Update code to recognize the new format and stop working around the old bugs. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4108 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/io/Streamer.as | 12 ------------ src/as/com/threerings/util/ClassUtil.as | 13 +++++-------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/as/com/threerings/io/Streamer.as b/src/as/com/threerings/io/Streamer.as index 008c25847..b38af2b76 100644 --- a/src/as/com/threerings/io/Streamer.as +++ b/src/as/com/threerings/io/Streamer.as @@ -70,7 +70,6 @@ public class Streamer initStreamers(); // see if we have a streamer for it -// Log.debug("getStreamer/existing"); for each (var streamer :Streamer in _streamers) { if (streamer.getJavaClassName() === jname) { return streamer; @@ -78,7 +77,6 @@ public class Streamer } // see if it's an array that we unstream using an ArrayStreamer -// Log.debug("getStreamer/array"); if (jname.charAt(0) === "[") { var streamer :Streamer = new ArrayStreamer(jname); _streamers.push(streamer); @@ -86,22 +84,12 @@ public class Streamer } // otherwise see if it represents a Streamable -// Log.debug("getStreamer/Class:Streamable"); var clazz :Class = ClassUtil.getClassByName( Translations.getFromServer(jname)); -// Log.debug("getStreamer/Class:Streamable2"); if (ClassUtil.isAssignableAs(Streamable, clazz)) { return null; // it's streamable } - // TEMP: workaround for fucked-up bug!!! - // The isAssignableAs (above) does not work right now, so we assume - // ALL classes are streamable, to get things working. - if (true) { - return null; - } - // END: hacky temp - return BAD_STREAMER; } diff --git a/src/as/com/threerings/util/ClassUtil.as b/src/as/com/threerings/util/ClassUtil.as index 0e6f8bb0c..d3c89251f 100644 --- a/src/as/com/threerings/util/ClassUtil.as +++ b/src/as/com/threerings/util/ClassUtil.as @@ -67,21 +67,18 @@ public class ClassUtil var typeInfo :XMLList = describeType(srcClass).child("factory"); // See which classes we extend. - var exts :XMLList = typeInfo.child("extends").attribute("type"); + var exts :XMLList = typeInfo.child("extendsClass").attribute("type"); for each (var type :String in exts) { - //if (asClass == getClassByName(type)) { - // TEMP: recursing sometimes gets around a describeType bug - if (isAssignableAs(asClass, getClassByName(type))) { + if (asClass == getClassByName(type)) { return true; } } // See which interfaces we implement. - var imps :XMLList = typeInfo.child("implements").attribute("type"); + var imps :XMLList = typeInfo.child("implementsInterface") + .attribute("type"); for each (var type :String in imps) { - //if (asClass == getClassByName(type)) { - // TEMP: recursing sometimes gets around a describeType bug - if (isAssignableAs(asClass, getClassByName(type))) { + if (asClass == getClassByName(type)) { return true; } }