mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00: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
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue