Further cleanup: always look up streamers by their java name.
- Sliiiiightly less efficient in a few cases. - But: looking typed arrays up by class didn't work anyway, there was some duplicated code in jname and class lookup, and the jname thing handles Lists from the server. So overall I think this is a win. Less code is better code. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5610 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -159,10 +159,11 @@ public class ObjectInputStream
|
||||
return null;
|
||||
}
|
||||
|
||||
var streamer :Streamer = (type is Class)
|
||||
? Streamer.getStreamerByClass(type as Class)
|
||||
: Streamer.getStreamerByJavaName(type as String);
|
||||
|
||||
var jname :String = type as String;
|
||||
if (type is Class) {
|
||||
jname = Translations.getToServer(ClassUtil.getClassName(type));
|
||||
}
|
||||
var streamer :Streamer = Streamer.getStreamerByJavaName(jname);
|
||||
if (streamer == null) {
|
||||
throw new Error("Cannot field stream " + type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user