[CSHARP-2560] The BsonDocument doesn't equal to itself when has double.NaN value in it. Created: 25/Mar/19 Updated: 31/Mar/22 |
|
| Status: | Backlog |
| Project: | C# Driver |
| Component/s: | BSON |
| Affects Version/s: | 2.8.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Tom | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
C# MongoDB Driver 2.8.0 |
||
| Description |
|
This piece of code print False: var bd = new BsonDouble(double.NaN); Console.WriteLine(document.Equals(document));
//This cause the BsonDocument can't be removed from a list. var list = new List<BsonDocument>(); list.Add(document);
|
| Comments |
| Comment by Ian Whalen (Inactive) [ 25/Mar/19 ] |
|
hey tom3000 thanks for the report. the definition of double.NaN is that two NaN values are not equal to each other, so we'll need to think about whether two BsonDocuments containing NaNs should be equal or not. |