File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,8 @@ public BulkWriteRequestBuilder find(final DBObject query) {
80
80
public BulkWriteResult execute () {
81
81
isTrue ("already executed" , !closed );
82
82
83
- try {
84
- return collection .executeBulkWriteOperation (ordered , requests );
85
- } finally {
86
- closed = true ;
87
- }
83
+ closed = true ;
84
+ return collection .executeBulkWriteOperation (ordered , requests );
88
85
}
89
86
90
87
/**
@@ -99,11 +96,8 @@ public BulkWriteResult execute() {
99
96
public BulkWriteResult execute (final WriteConcern writeConcern ) {
100
97
isTrue ("already executed" , !closed );
101
98
102
- try {
103
- return collection .executeBulkWriteOperation (ordered , requests , writeConcern );
104
- } finally {
105
- closed = true ;
106
- }
99
+ closed = true ;
100
+ return collection .executeBulkWriteOperation (ordered , requests , writeConcern );
107
101
}
108
102
109
103
void addRequest (final WriteRequest request ) {
You can’t perform that action at this time.
0 commit comments