[JAVA-2322] A null filter passed to DBCollection.find throws an exception when it used to be alled Created: 23/Sep/16  Updated: 26/Dec/19  Resolved: 26/Sep/16

Status: Closed
Project: Java Driver
Component/s: API
Affects Version/s: None
Fix Version/s: 3.4.0-rc1, 3.4.0

Type: Bug Priority: Major - P3
Reporter: Steve Briskin (Inactive) Assignee: Ross Lawley
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

DBCollection.find(query) requires a non-null query now.

https://github.com/mongodb/mongo-java-driver/commit/12f7865e76bbdf2ba767063eac5f85009e3a5148#diff-63b23e37c4829b04dae9e12527bc3e58R106

Repro:

        MongoClient c = new MongoClient();
        c.getDB("test").getCollection("x").find(null);



 Comments   
Comment by Githook User [ 26/Sep/16 ]

Author:

{u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}

Message: Revert DBCollection.find requring notNull queries

Historically it has, so changing it breaks existing behaviour.
JAVA-2322
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/c5fe552fb8070c04201c766a9f11af1873da0871

Comment by Ross Lawley [ 26/Sep/16 ]

PR: https://github.com/rozza/mongo-java-driver/pull/164

Comment by Ross Lawley [ 26/Sep/16 ]

Thanks steve.briskin,

That was an oversight on my part.

Ross

Generated at Thu Feb 08 08:56:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.