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

XMLWordPrintableJSON

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

      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 Stam
              Reporter:
              Robert Stam
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: