-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.11.2
-
Component/s: GridFS
-
None
-
Environment:java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)
Mongodb version: 2.0.6
Java driver version: 2.11.2
When passing null to GridFS.remove(DBObject dbobject) all files of the current bucket are removed. This is inconsistent compared to the other remove() methods of GridFS:
gridFs.remove((String)null); // nothing happens
gridFs.remove((ObjectId)null); // nothing happens
gridFs.remove((DBObject)null); // all files from bucket are removed
If this is intended behavior it should be documented in the javadoc comment.