git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6529 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2011-03-09 04:10:29 +00:00
parent fb39890cbd
commit 4acf173bf3
@@ -275,11 +275,11 @@ public abstract class Streamer
default:
List<?> universe = ImmutableList.copyOf(target.getEnumConstants());
int size = universe.size();
if (size <= (1 << (Byte.SIZE - 1))) {
int maxOrdinal = universe.size() - 1;
if (maxOrdinal <= Byte.MAX_VALUE) {
return new ByteOrdEnumStreamer(target, universe);
} else if (size <= (1 << (Short.SIZE - 1))) {
} else if (maxOrdinal <= Short.MAX_VALUE) {
return new ShortOrdEnumStreamer(target, universe);
} else {