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.

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 1.8
    • 1.7
    • None
    • None
    • Minor Change

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: