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

BSONObject et al.: wrong return value in JavaDoc for put(k,v)

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.13.0, 3.0.0
    • Affects Version/s: 2.12.3
    • Component/s: Documentation
    • None

      BSONObject, BasicBSONObject, etc. claim to return the value passed to it, but they appear to rely on java.util.HashMap which returns the previous value: http://docs.oracle.com/javase/7/docs/api/java/util/HashMap.html#put(K,%20V)

      example of JavaDoc of BSONObject, BasicBSONObject, ...:
      {{
      @return <tt>v</tt>
      @return the <code>val</code> parameter
      }}

      P.s.: I was actually hoping it would return the BSONObject itself so I could chain put() operations together

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jgrivolla Jens Grivolla
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: