Skip to content

Commit 2545049

Browse files
committed
JAVA-2580: Remove any remaining incidental references to MongoDB 2.4
1 parent 09baaaf commit 2545049

File tree

12 files changed

+24
-714
lines changed

12 files changed

+24
-714
lines changed

driver-async/src/test/functional/com/mongodb/async/client/CrudTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,7 @@ private BsonDocument toResult(final MongoOperationUpdateResult operation) {
232232
if (updateResult.isModifiedCountAvailable()) {
233233
resultDoc.append("modifiedCount", new BsonInt32((int) updateResult.getModifiedCount()));
234234
}
235-
// If the upsertedId is an ObjectId that means it came from the server and can't be verified.
236-
// This check is to handle the "ReplaceOne with upsert when no documents match without an id specified" test
237-
// in replaceOne-pre_2.6
238-
if (updateResult.getUpsertedId() != null && !updateResult.getUpsertedId().isObjectId()) {
235+
if (updateResult.getUpsertedId() != null) {
239236
resultDoc.append("upsertedId", updateResult.getUpsertedId());
240237
}
241238
resultDoc.append("upsertedCount", updateResult.getUpsertedId() == null ? new BsonInt32(0) : new BsonInt32(1));

driver-core/src/main/com/mongodb/connection/ServerVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import static java.util.Arrays.asList;
2727

2828
/**
29-
* Holds an array of three integers representing the server version, e.g. [2, 4, 1].
29+
* Holds an array of three integers representing the server version, e.g. [3, 4, 1].
3030
*
3131
* @since 3.0
3232
*/

driver-core/src/test/functional/com/mongodb/connection/ServerMonitorSpecification.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class ServerMonitorSpecification extends OperationFunctionalSpecification {
200200
.hosts(new HashSet<String>(asList('localhost:27017', 'localhost:27018')))
201201
.passives(new HashSet<String>(asList('localhost:27019')))
202202
.arbiters(new HashSet<String>(asList('localhost:27020')))
203-
.version(new ServerVersion(asList(2, 4, 1)))
203+
.version(new ServerVersion(asList(3, 4, 1)))
204204
.electionId(new ObjectId('abcdabcdabcdabcdabcdabcd'))
205205
.setVersion(2)
206206
}

driver-core/src/test/resources/crud/write/findOneAndReplace-upsert_pre_2.6.json

Lines changed: 0 additions & 161 deletions
This file was deleted.

driver-core/src/test/resources/crud/write/replaceOne-pre_2.6.json

Lines changed: 0 additions & 179 deletions
This file was deleted.

0 commit comments

Comments
 (0)