Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-863

gridFs.remove((DBObject)null) removes all elements from bucket

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.12.0, 3.0.0
    • 2.11.2
    • GridFS
    • None
    • 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

    Description

      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.

      Attachments

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            micha Micha S.
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: