[GODRIVER-599] ValueEncoders should check if pointer is nil Created: 15/Oct/18  Updated: 28/Oct/23  Resolved: 01/Nov/18

Status: Closed
Project: Go Driver
Component/s: BSON
Affects Version/s: 0.0.16
Fix Version/s: 0.0.18

Type: Bug Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Isabella Siu (Inactive)
Resolution: Fixed Votes: 0
Labels: beta, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Currently when a pointer to a value, such as *objectid.ObjectID is encoded the value of the pointer is taken without first checking to see if the pointer is nil. Add a check to see if the pointer is nil and if it is, write a BSON null for the value instead. This should be done for all of the default encoders and primitive encoders.



 Comments   
Comment by Githook User [ 01/Nov/18 ]

Author:

{'name': 'Isabella Siu', 'email': 'isabella.siu@10gen.com'}

Message: GODRIVER-599 valueEncoders should check if pointer is nil

Change-Id: I26cb2b0cd11a087c4ea285116b94d1451a4d337b
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/7bd7754bfeb8b2717ad4c7d7ea6ef30614371f5a

Generated at Thu Feb 08 08:34:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.