Skip to content

Commit b9acc05

Browse files
committed
Deprecate com.mongodb.DB constructor taking a com.mongodb.Mongo
With the deprecation of com.mongodb.Mongo this constructor is also now deprecated as well so that the Mongo class can be removed in the next major release. JAVA-3051
1 parent 3c23f84 commit b9acc05

File tree

1 file changed

+2
-0
lines changed
  • driver-legacy/src/main/com/mongodb

1 file changed

+2
-0
lines changed

driver-legacy/src/main/com/mongodb/DB.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ public class DB {
9797
*
9898
* @param mongo the mongo instance
9999
* @param name the database name - must not be empty and cannot contain spaces
100+
* @deprecated Prefer {@link MongoClient#getDB(String)}
100101
*/
102+
@Deprecated
101103
public DB(final Mongo mongo, final String name) {
102104
this(mongo, name, mongo.createOperationExecutor());
103105
}

0 commit comments

Comments
 (0)