From d2e8ad120e6b2b77c1127c4ed02161709180fd49 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Sat, 2 Nov 2024 14:46:29 +0100 Subject: [PATCH] Remove breaking change in `log4j-mongodb` --- log4j-mongodb/pom.xml | 2 -- .../logging/log4j/mongodb/MongoDbProvider.java | 15 +++++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/log4j-mongodb/pom.xml b/log4j-mongodb/pom.xml index 8a71f4ff60e..b67845990fc 100644 --- a/log4j-mongodb/pom.xml +++ b/log4j-mongodb/pom.xml @@ -32,8 +32,6 @@ 5.2.0 2.0.16 - - true diff --git a/log4j-mongodb/src/main/java/org/apache/logging/log4j/mongodb/MongoDbProvider.java b/log4j-mongodb/src/main/java/org/apache/logging/log4j/mongodb/MongoDbProvider.java index 69069949dfe..97e75d8deee 100644 --- a/log4j-mongodb/src/main/java/org/apache/logging/log4j/mongodb/MongoDbProvider.java +++ b/log4j-mongodb/src/main/java/org/apache/logging/log4j/mongodb/MongoDbProvider.java @@ -53,12 +53,19 @@ private MongoDbProvider() { } /** - * Creates a new builder. - * - * @return a new builder. + * @deprecated since 2.25.0 use the typesafe {@link #newMongoDbBuilder()} method. + */ + @Deprecated + @SuppressWarnings("unchecked") + public static > B newBuilder() { + return (B) newMongoDbBuilder(); + } + + /** + * Creates a builder for the MongoDB plugin */ @PluginBuilderFactory - public static Builder newBuilder() { + public static Builder newMongoDbBuilder() { return new Builder(); } }