API documentation change for class DBCollection

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 3.0.0, 2.14.0
    • Affects Version/s: 3.0.0
    • Component/s: Documentation
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the Javadoc for class DBCollection there is a mistake.

      It is written for an example on how to use the class:
      "MongoClient mongoClient = newMongoClient(newServerAddress("localhost", 27017));
      DB db = mongo.getDB("mydb");
      DBCollection collection = db.getCollection("test"); "

      BUT when initialising DB it should say:
      "DB db = mongoClient.getDB("mydb");"

      as the MongoClient variable name is "mongoClient" and not "mongo".

      Link to Javadoc: name.http://api.mongodb.org/java/current/com/mongodb/DBCollection.html

              Assignee:
              Ross Lawley
              Reporter:
              Fabian Basciani
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: