[JAVA-4544] Move duplicated fields into BaseFindAndModifyOperation Created: 22/Mar/22  Updated: 28/Oct/23  Resolved: 23/Mar/22

Status: Closed
Project: Java Driver
Component/s: Internal
Affects Version/s: None
Fix Version/s: 4.6.0

Type: Improvement Priority: Minor - P4
Reporter: Ross Lawley Assignee: Ross Lawley
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by JAVA-4543 Move duplicated fields into BaseFindA... Closed

 Description   

 The various FindAnd<Something>Operations share the following fields:

 

    private BsonDocument filter;
    private BsonDocument projection;
    private BsonDocument sort;
    
    private Collation collation;
    private Bson hint;
    private String hintString;
    private BsonValue comment;

These can be DRY'd up into the abstract base class.



 Comments   
Comment by Githook User [ 23/Mar/22 ]

Author:

{'name': 'Ross Lawley', 'email': 'ross.lawley@gmail.com', 'username': 'rozza'}

Message: Reduced duplication in the FindAndModify operations (#898)

JAVA-4544
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/331bb3ef4bb85d272a0dfa53c138191772329bf4

Generated at Thu Feb 08 09:02:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.