File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
driver-sync/src/main/com/mongodb/client/internal Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change 18
18
19
19
import com .mongodb .AutoEncryptionSettings ;
20
20
import com .mongodb .ClientSessionOptions ;
21
- import com .mongodb .MongoClientException ;
22
21
import com .mongodb .MongoClientSettings ;
23
22
import com .mongodb .MongoDriverInformation ;
24
23
import com .mongodb .ReadPreference ;
@@ -143,12 +142,8 @@ public ClientSession startSession() {
143
142
144
143
@ Override
145
144
public ClientSession startSession (final ClientSessionOptions options ) {
146
- ClientSession clientSession = delegate .createClientSession (notNull ("options" , options ),
145
+ return delegate .createClientSession (notNull ("options" , options ),
147
146
settings .getReadConcern (), settings .getWriteConcern (), settings .getReadPreference ());
148
- if (clientSession == null ) {
149
- throw new MongoClientException ("Sessions are not supported by the MongoDB cluster to which this client is connected" );
150
- }
151
- return clientSession ;
152
147
}
153
148
154
149
@ Override
You can’t perform that action at this time.
0 commit comments