Skip to content

Commit 55391df

Browse files
committed
Add comment to BsonBinary#getData indicating that it returns the internal copy of the array
JAVA-3634
1 parent cfd3b5c commit 55391df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bson/src/main/org/bson/BsonBinary.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ public byte getType() {
165165
/**
166166
* Gets the data of this Binary.
167167
*
168+
* This method returns the internal copy of the byte array, so only modify the contents of the returned array if the intention is to
169+
* change the state of this instance.
170+
*
168171
* @return the data
169172
*/
170173
public byte[] getData() {

0 commit comments

Comments
 (0)