[CSHARP-1418] DownloadsBytesAsync throws a NullReferenceException if options parameter is null Created: 19/Sep/15  Updated: 20/Jan/16  Resolved: 14/Oct/15

Status: Closed
Project: C# Driver
Component/s: GridFS
Affects Version/s: 2.1
Fix Version/s: 2.1

Type: Bug Priority: Major - P3
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related

 Description   

The options parameter to the DownloadAsBytesAsync method in GridFSBucket is optional, and defaults to null.

But if no options are provided, DownloadAsBytesAsync throws a NullReferenceException instead of using default options.



 Comments   
Comment by Githook User [ 14/Oct/15 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1418: Make sure null GridFS options are replaced with default options everywhere.
Branch: v2.1.x
https://github.com/mongodb/mongo-csharp-driver/commit/d7209e2faa1a468f4d9c3f32374ce4d91df7c8c7

Comment by Githook User [ 14/Oct/15 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1418: Make sure null GridFS options are replaced with default options everywhere.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/11464807b100b047abfefe5ca1221080a2a63a34

Comment by Leonid Belenky [ 14/Oct/15 ]

Have the same issue.
workarrounded by "null" providing as an option.

Generated at Wed Feb 07 21:39:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.