Skip to content

Commit

Permalink
msgpack#542: Add a warning note for the usage of MessageUnpacker.read…
Browse files Browse the repository at this point in the history
…PayloadAsReference
  • Loading branch information
xerial committed Feb 14, 2021
1 parent a7bcbec commit 367fd7b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,9 @@ public void readPayload(byte[] dst, int off, int len)
/**
* Reads payload bytes of binary, extension, or raw string types as a reference to internal buffer.
*
* Note: This methods may return raw memory region, access to which has no strict boundary checks.
* To use this method safely, you need to understand the internal buffer handling of msgpack-java.
*
* <p>
* This consumes specified amount of bytes and returns its reference or copy. This method tries to
* return reference as much as possible because it is faster. However, it may copy data to a newly
Expand Down

0 comments on commit 367fd7b

Please sign in to comment.