Cleaned that method up a bit.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3922 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-03-08 01:03:57 +00:00
parent b72ee36b29
commit a0e9f70db3
+7 -8
View File
@@ -56,7 +56,7 @@ public class Streamer
*/
public synchronized static boolean isStreamable (Class target)
{
do {
while (true) {
// if we've got a streamer for it, it's good
if (_streamers.containsKey(target)) {
return true;
@@ -65,14 +65,13 @@ public class Streamer
// if it's an array, check the component type
if (target.isArray()) {
target = target.getComponentType();
// and loop back around for another go
} else {
break;
}
} while (true);
// and loop back around for another check with the comp type...
// it'll be ok if the type (or component type) is Streamable
return Streamable.class.isAssignableFrom(target);
} else {
// it'll be ok if the type (or component type) is Streamable
return Streamable.class.isAssignableFrom(target);
}
}
}
/**