mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-21 23:56:55 +02:00
java: Fixed a bug that ClassTemplate cannot pack a ByteBuffer object but, it is a temporary impl.
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user