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

Change UpdateResult modifiedCount to type long

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: CRUD
    • None
    • Java Drivers

      Correctness warning for acknowledge update results.

      public static UpdateResult acknowledged(
           final long matchedCount, 
          @Nullable final Long modifiedCount,   // Marked as nullable.
          @Nullable final BsonValue upsertedId)
      
      // Then in AcknowledgedUpdateResult its not marked nullable
      AcknowledgedUpdateResult(final long matchedCount, final Long modifiedCount, @Nullable final BsonValue upsertedId) 
      
      // The getter uses long
      public long getModifiedCount()
      

      Community PR: https://github.com/mongodb/mongo-java-driver/pull/1480

            Assignee:
            Unassigned Unassigned
            Reporter:
            ross@mongodb.com Ross Lawley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: