[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: |
| 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). |