mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 13:02:13 +01:00
java: Fixed a bug that ClassTemplate cannot pack a ByteBuffer object but, it is a temporary impl.
This commit is contained in:
parent
c2c7591987
commit
fa0b576a45
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user