Skip to content

Commit 289edc6

Browse files
committed
JAVA-872: Set alwaysUseMBeans in MongoOptions(MongoClientOptions) constructor. See writeConcern to null in MongoClientOptions.reset() and MongoClientOptions.copy()
1 parent 9bb29e7 commit 289edc6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/com/mongodb/MongoOptions.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public MongoOptions(final MongoClientOptions options) {
5555
cursorFinalizerEnabled = options.isCursorFinalizerEnabled();
5656
writeConcern = options.getWriteConcern();
5757
slaveOk = false; // default to false, as readPreference field will be responsible
58+
alwaysUseMBeans = options.isAlwaysUseMBeans();
5859
}
5960

6061
public void reset(){
@@ -68,6 +69,7 @@ public void reset(){
6869
maxAutoConnectRetryTime = 0;
6970
slaveOk = false;
7071
readPreference = null;
72+
writeConcern = null;
7173
safe = false;
7274
w = 0;
7375
wtimeout = 0;
@@ -93,6 +95,7 @@ public MongoOptions copy() {
9395
m.maxAutoConnectRetryTime = maxAutoConnectRetryTime;
9496
m.slaveOk = slaveOk;
9597
m.readPreference = readPreference;
98+
m.writeConcern = writeConcern;
9699
m.safe = safe;
97100
m.w = w;
98101
m.wtimeout = wtimeout;

0 commit comments

Comments
 (0)