Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ public class MessageBuffer {
// We need to use reflection to find MessageBuffer implementation classes because
// importing these classes creates TypeProfile and adds some overhead to method calls.
String bufferClsName;
if(!isAndroid && isJavaAtLeast7) {
boolean useUniversalBuffer = Boolean.parseBoolean(System.getProperty("msgpack.universal-buffer", "false"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

if(!useUniversalBuffer && !isAndroid && isJavaAtLeast7) {
if(isLittleEndian)
bufferClsName = "org.msgpack.core.buffer.MessageBuffer";
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class MessageBufferU extends MessageBuffer {

MessageBufferU(ByteBuffer bb) {
super(null, 0L, bb.remaining(), bb.order(ByteOrder.BIG_ENDIAN));
super(null, 0L, bb.capacity(), bb.order(ByteOrder.BIG_ENDIAN));
checkNotNull(reference);
}

Expand Down