Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate MongoClientWrapper for removal and without replacement #659

Merged
merged 1 commit into from
Jan 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/main/java/org/kiwiproject/mongo/MongoClientWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@
import com.mongodb.MongoClientURI;
import com.mongodb.client.MongoDatabase;
import lombok.Getter;
import org.kiwiproject.base.KiwiDeprecated;

import java.io.Closeable;

/**
* A wrapper around a {@link MongoClient} that also provides {@link MongoDatabase} and {@link DB} instances
* for a specific database, which is specified in the constructor.
*
* @deprecated with no replacement since we no longer support the older Mongo 3.x driver versions and our code must
* therefore use only the new Mongo APIs (i.e. {@code com.mongodb.DB} doesn't exist in the Mongo 4.x drivers).
*/
@Beta
@Deprecated(forRemoval = true, since = "1.2.1")
@KiwiDeprecated(since = "1.2.1", removeAt = "2.0.0", reference = "https://github.com/kiwiproject/kiwi/issues/658")
public class MongoClientWrapper implements Closeable {

/**
Expand All @@ -40,7 +46,6 @@ public class MongoClientWrapper implements Closeable {
* @param mongoUri the Mongo connection URI
* @param databaseName the database associated with this instance
*/
@SuppressWarnings("deprecation")
public MongoClientWrapper(String mongoUri, String databaseName) {
checkArgumentNotBlank(mongoUri, "mongoUri cannot be blank");
checkArgumentNotBlank(databaseName, "databaseName cannot be blank");
Expand Down