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

Deferred collection creation throws NPE

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.1.1, 3.2.0
    • Affects Version/s: 3.0.3, 3.0.4
    • Component/s: Command Operations
    • None

      com.mongodb.DB.createCollection is documented as deferring the collection creation if the options parameter is null.

      This was the behaviour in 2.x

      3.0.x fail with a NullPointerException because the options parameter is accessed in com.mongodb.DB.getCreateCollectionOperation without a null-check.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            gordonsyme Gordon Syme
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: