mreutegg commented on code in PR #295:
URL: https://github.com/apache/jackrabbit-oak/pull/295#discussion_r962907614


##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java:
##########
@@ -1924,15 +1924,15 @@ public void setReadWriteMode(String readWriteMode) {
             if(!readWriteMode.startsWith("mongodb://")){
                 rwModeUri = String.format("mongodb://localhost/?%s", 
readWriteMode);
             }
-            MongoClientURI uri = new MongoClientURI(rwModeUri);
-            ReadPreference readPref = uri.getOptions().getReadPreference();
+            ConnectionString uri = new ConnectionString(rwModeUri);
+            ReadPreference readPref = uri.getReadPreference();

Review Comment:
   As you noted in another comment `ReadPreference` as well as `WriteConcern` 
further down can be `null` after the driver update. There need to be null 
checks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to