mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-21 15:51:44 +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.util.*;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
public class ClassTemplate implements Template {
|
public class ClassTemplate implements Template {
|
||||||
static {
|
static {
|
||||||
@@ -122,6 +123,10 @@ public class ClassTemplate implements Template {
|
|||||||
pk.packBigInteger((BigInteger)o);
|
pk.packBigInteger((BigInteger)o);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (o instanceof ByteBuffer) { // FIXME
|
||||||
|
Templates.tByteBuffer().pack(pk, o);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MessagePacker packer = CustomPacker.get(klass);
|
MessagePacker packer = CustomPacker.get(klass);
|
||||||
if(packer != null) {
|
if(packer != null) {
|
||||||
|
Reference in New Issue
Block a user