Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2062

JavaDoc vs tutorial mismatch regarding creation of MongoCredential

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • None
    • None

    Description

      The Tutorial (http://docs.mongodb.org/ecosystem/tutorial/authenticate-with-java-driver/) shows MongoCredential created directly with new like

      new MongoCredential("user1", "password1".toCharArray(), "first");

      but the JavaDocs show MongoCredential as having no constructor preferring, I guess, the static methods like

      public static MongoCredential createMongoCRCredential(String userName, String database, char[] password)

      I hate it when the examples don't work.

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            bob_kuhar Bob Kuhar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 18 weeks, 6 days ago