Skip to content

Commit 18a741e

Browse files
committed
Changed all occurrences of MongoDB 2.8 release number to 3.0.
JAVA-1630
1 parent 72aaad4 commit 18a741e

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
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, 8, 0))) {
151+
if (isServerVersionAtLeast(asList(3, 0, 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, 8, 0))) {
345+
if (db.isServerVersionAtLeast(asList(3, 0, 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, 8)) >= 0) {
367+
if (mongo.getConnector().getServerDescription(getAddress()).getVersion().compareTo(new ServerVersion(3, 0)) >= 0) {
368368
actualCredentials = MongoCredential.createScramSha1Credential(credentials.getUserName(), credentials.getSource(),
369369
credentials.getPassword());
370370
} else {

src/main/com/mongodb/MongoCredential.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public final class MongoCredential {
5656
* The SCRAM-SHA-1 mechanism. See the <a href="http://tools.ietf.org/html/rfc5802">RFC</a>.
5757
*
5858
* @since 2.13
59-
* @mongodb.server.release 2.8
59+
* @mongodb.server.release 3.0
6060
*/
6161
public static final String SCRAM_SHA_1_MECHANISM = "SCRAM-SHA-1";
6262

@@ -77,7 +77,7 @@ public final class MongoCredential {
7777

7878
/**
7979
* Creates a MongoCredential instance with an unspecified mechanism. The client will negotiate the best mechanism based on the
80-
* version of the server that the client is authenticating to. If the server version is 2.8 or higher,
80+
* version of the server that the client is authenticating to. If the server version is 3.0 or higher,
8181
* the driver will authenticate using the SCRAM-SHA-1 mechanism. Otherwise, the driver will authenticate using the MONGODB_CR
8282
* mechanism.
8383
*
@@ -107,7 +107,7 @@ public static MongoCredential createCredential(String userName, String database,
107107
* @see #createCredential(String, String, char[])
108108
*
109109
* @since 2.13
110-
* @mongodb.server.release 2.8
110+
* @mongodb.server.release 3.0
111111
*/
112112
public static MongoCredential createScramSha1Credential(final String userName, final String source, final char[] password) {
113113
return new MongoCredential(SCRAM_SHA_1_MECHANISM, userName, source, password);

0 commit comments

Comments
 (0)