Skip to content

Commit 0f39f5d

Browse files
committed
Update server version checks from 2.7 to 2.8, as the final release of the driver need not support the 2.7 development branch.
1 parent 2d91ec1 commit 0f39f5d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/main/com/mongodb/DBApiLayer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public Set<String> getCollectionNames() {
148148
requestStart();
149149
try {
150150
List<String> collectionNames = new ArrayList<String>();
151-
if (isServerVersionAtLeast(asList(2, 7, 7))) {
151+
if (isServerVersionAtLeast(asList(2, 8, 0))) {
152152
CommandResult res = command(new BasicDBObject("listCollections", getName()), ReadPreference.primary());
153153
if (!res.ok() && res.getCode() != 26) {
154154
res.throwOnError();

src/main/com/mongodb/DBCollectionImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public List<DBObject> getIndexInfo() {
342342
try {
343343
List<DBObject> list = new ArrayList<DBObject>();
344344

345-
if (db.isServerVersionAtLeast(asList(2, 7, 6))) {
345+
if (db.isServerVersionAtLeast(asList(2, 8, 0))) {
346346
CommandResult res = _db.command(new BasicDBObject("listIndexes", getName()), ReadPreference.primary());
347347
if (!res.ok() && res.getCode() == 26) {
348348
return list;

src/main/com/mongodb/DBPort.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ CommandResult authenticate(Mongo mongo, final MongoCredential credentials) {
364364
Authenticator authenticator;
365365
MongoCredential actualCredentials;
366366
if (credentials.getMechanism() == null) {
367-
if (mongo.getConnector().getServerDescription(getAddress()).getVersion().compareTo(new ServerVersion(2, 7)) >= 0) {
367+
if (mongo.getConnector().getServerDescription(getAddress()).getVersion().compareTo(new ServerVersion(2, 8)) >= 0) {
368368
actualCredentials = MongoCredential.createScramSha1Credential(credentials.getUserName(), credentials.getSource(),
369369
credentials.getPassword());
370370
} else {

0 commit comments

Comments
 (0)