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

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 1.4.2
    • Affects Version/s: 1.4.1
    • Component/s: 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@mongodb.com Robert Stam
            Reporter:
            nightroman Roman Kuzmin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: