File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
driver-core/src/main/com/mongodb/internal/connection Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ private List<BsonElement> getExtraElements(final OperationContext operationConte
286
286
throw new MongoClientException ("Attempting to use a ClientSession while connected to a server that doesn't support "
287
287
+ "sessions" );
288
288
}
289
- if (getSettings ().isSessionSupported () && responseExpected ) {
289
+ if (getSettings ().isSessionSupported () && requireOpMsgResponse () ) {
290
290
extraElements .add (new BsonElement ("lsid" , sessionContext .getSessionId ()));
291
291
}
292
292
}
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ public String getPayloadName() {
117
117
}
118
118
119
119
boolean hasPayload () {
120
- return writeRequestWithIndexes .size () > 0 ;
120
+ return ! writeRequestWithIndexes .isEmpty () ;
121
121
}
122
122
123
123
public int size () {
@@ -137,10 +137,6 @@ public List<BsonDocument> getPayload() {
137
137
.collect (Collectors .toList ());
138
138
}
139
139
140
- public List <WriteRequestWithIndex > getWriteRequestWithIndexes () {
141
- return writeRequestWithIndexes ;
142
- }
143
-
144
140
/**
145
141
* @return the current position in the payload
146
142
*/
You can’t perform that action at this time.
0 commit comments