File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
marklogic-client-api/src/main/java/com/marklogic/client/impl Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 3232public class DocumentWriteSetImpl implements Set <DocumentWriteOperation >,DocumentWriteSet {
3333
3434 private List <DocumentWriteOperation > operations ;
35- AtomicBoolean canSort ;
35+ Boolean canSort ;
3636
3737 DocumentWriteSetImpl (){
3838 operations = new ArrayList <>();
39- canSort = new AtomicBoolean ( true ) ;
39+ canSort = true ;
4040 }
4141 @ Override
4242 public DocumentWriteSet addDefault (DocumentMetadataWriteHandle metadataHandle ) {
43- if (canSort . get () && operations .size () > 0 )
44- canSort = new AtomicBoolean ( false ) ;
43+ if (canSort && operations .size () > 0 )
44+ canSort = false ;
4545 add (new DocumentWriteOperationImpl (OperationType .METADATA_DEFAULT ,
4646 null , metadataHandle , null ));
4747 return this ;
4848 }
4949
5050 @ Override
5151 public DocumentWriteSet disableDefault () {
52- if (canSort . get () && operations .size () > 0 )
53- canSort = new AtomicBoolean ( false ) ;
52+ if (canSort && operations .size () > 0 )
53+ canSort = false ;
5454 add (new DocumentWriteOperationImpl (OperationType .DISABLE_METADATA_DEFAULT ,
5555 null , new StringHandle ("{ }" ).withFormat (Format .JSON ), null ));
5656 return this ;
@@ -164,7 +164,7 @@ public boolean contains(Object o) {
164164
165165 @ Override
166166 public Iterator <DocumentWriteOperation > iterator () {
167- if (canSort . get () )
167+ if (canSort )
168168 Collections .sort (operations );
169169 return operations .iterator ();
170170 }
You can’t perform that action at this time.
0 commit comments