[CSHARP-1898] Potentially unintended unused variable. Created: 20/Jan/17  Updated: 07/Feb/17  Resolved: 26/Jan/17

Status: Closed
Project: C# Driver
Component/s: Serialization
Affects Version/s: 2.4.1
Fix Version/s: 2.4.2

Type: Improvement Priority: Minor - P4
Reporter: Carl Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In BsonClassMapSerializer<>.TryGetMemberSerializationInfo(...), the variable nominalType is not used when constructing the BsonSerializationInfo to be returned; serializer.ValueType is used instead.

Using nominalType seems more reasonable, but I'm not certain. If using serializer.ValueType is intended, remove the unused variable; otherwise, use it.



 Comments   
Comment by Githook User [ 26/Jan/17 ]

Author:

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

Message: CSHARP-1898: Remove unused variable.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/2d80f4c613924ad75a691867933d96bb5e398fd3

Comment by Robert Stam [ 25/Jan/17 ]

Removed the unused variable.

Note also that serializer.ValueType is always going to be equal to memberMap.MemberType (so also equal to the unused nominalType variable).

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