1.4.1 "QueryBuilder.In" fails when BsonArray argument is cast to IEnumerable<BsonValue>

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Blocker - P1
    • 1.4.2
    • Affects Version/s: 1.4.1
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      \Driver\Builders\QueryBuilder.cs(1015):
      public QueryConditionList In(IEnumerable<BsonValue> values)

      It calls `if (values.Contains(null)) ...` with a null argument. At the same time in

      \Bson\ObjectModel\BsonArray.cs(648):
      public bool Contains(BsonValue value)

      .. there is:
      if (value == null)
      {
      throw new ArgumentNullException("value");
      }

      Thus, `In` seems to be always throwing an exception in 1.4.1

              Assignee:
              Robert Stam
              Reporter:
              Roman Kuzmin
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: