Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-670

ObjectId constructor should throw an ArgumentOutOfRange if any of the components are out of range.

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.8
    • Affects Version/s: 1.7
    • Component/s: None
    • None
    • Minor Change

      This makes sure that the values stored in the ObjectId field are all within the range of values that can be successfully round tripped.

      It also prevents weird behavior with Equals and GetHashCode.

      Note that the driver internally is not passing invalid values to the ObjectId constructor, but user code creating a custom ObjectId might.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: