Skip to content

Commit 33fb296

Browse files
committed
Changing "canSort" to Boolean.
1 parent c9444e9 commit 33fb296

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

marklogic-client-api/src/main/java/com/marklogic/client/impl/DocumentWriteSetImpl.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,25 @@
3232
public 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
}

0 commit comments

Comments
 (0)