java: Fixed a bug that ClassTemplate cannot pack a ByteBuffer object but, it is a temporary impl.

This commit is contained in:
Muga Nishizawa 2010-11-11 13:38:15 +09:00
parent c2c7591987
commit fa0b576a45

View File

@ -27,6 +27,7 @@ import org.msgpack.util.codegen.DynamicOrdinalEnumTemplate;
import java.util.*;
import java.math.BigInteger;
import java.nio.ByteBuffer;
public class ClassTemplate implements Template {
static {
@ -122,6 +123,10 @@ public class ClassTemplate implements Template {
pk.packBigInteger((BigInteger)o);
return;
}
if (o instanceof ByteBuffer) { // FIXME
Templates.tByteBuffer().pack(pk, o);
return;
}
MessagePacker packer = CustomPacker.get(klass);
if(packer != null) {