Skip to content

Commit 5350ba8

Browse files
committed
JAVA-368: When reading back binary of type B_GENERAL (2) Java driver creates a Binary object which breaks some driver and user code
1 parent 6037357 commit 5350ba8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/org/bson/BasicBSONCallback.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public void gotBinaryArray( String name , byte[] data ){
136136
}
137137

138138
public void gotBinary( String name , byte type , byte[] data ){
139-
if( type == BSON.B_GENERAL )
139+
if( type == BSON.B_GENERAL || type == BSON.B_BINARY )
140140
_put( name , data );
141141
else
142142
_put( name , new Binary( type , data ) );

0 commit comments

Comments
 (0)