Skip to content

fix issue 159#163

Closed
xuwei-k wants to merge 1 commit intomsgpack:v07-developfrom
xuwei-k:issue159
Closed

fix issue 159#163
xuwei-k wants to merge 1 commit intomsgpack:v07-developfrom
xuwei-k:issue159

Conversation

@xuwei-k
Copy link
Contributor

@xuwei-k xuwei-k commented Dec 24, 2014

ref #159

@xerial
Copy link
Member

xerial commented Dec 29, 2014

Hi,

I think reseting the cursor position of ByteBuffer is not common in Java library. For example, ByteBuffer.put(ByteBuffer src) moves the cursor position of the input source after writing the data: http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html#put(java.nio.ByteBuffer)

Could you explain a little bit more why resetting the cursor position is necessary?

@xuwei-k
Copy link
Contributor Author

xuwei-k commented Dec 29, 2014

I just simply want to fix #159. RawStringValueImpl#equals depends on position of ByteBuffer

Should we fix RawStringValueImpl#equals instead of MessagePacker#writePayload ?

@xerial
Copy link
Member

xerial commented Dec 29, 2014

Yes. Moving the cursor position of ByteBuffer is necessary to let the user know how many bytes are read from ByteBuffer.

@xuwei-k xuwei-k closed this Dec 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants