Skip to content

Commit 39fff7c

Browse files
Do not use log4j deprecation handler
1 parent 87aa557 commit 39fff7c

File tree

1 file changed

+11
-2
lines changed
  • client/rest-high-level/src/main/java/org/elasticsearch/client/ml/job/config

1 file changed

+11
-2
lines changed

client/rest-high-level/src/main/java/org/elasticsearch/client/ml/job/config/RuleScope.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import org.elasticsearch.common.Strings;
2222
import org.elasticsearch.common.xcontent.ContextParser;
23-
import org.elasticsearch.common.xcontent.LoggingDeprecationHandler;
23+
import org.elasticsearch.common.xcontent.DeprecationHandler;
2424
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
2525
import org.elasticsearch.common.xcontent.ToXContentObject;
2626
import org.elasticsearch.common.xcontent.XContentBuilder;
@@ -50,7 +50,7 @@ public static ContextParser<Void, RuleScope> parser() {
5050
Map<String, ?> value = (Map<String, ?>) entry.getValue();
5151
builder.map(value);
5252
try (XContentParser scopeParser = XContentFactory.xContent(builder.contentType()).createParser(
53-
NamedXContentRegistry.EMPTY, LoggingDeprecationHandler.INSTANCE, Strings.toString(builder))) {
53+
NamedXContentRegistry.EMPTY, DEPRECATION_HANDLER, Strings.toString(builder))) {
5454
scope.put(entry.getKey(), FilterRef.PARSER.parse(scopeParser, null));
5555
}
5656
}
@@ -59,6 +59,15 @@ public static ContextParser<Void, RuleScope> parser() {
5959
};
6060
}
6161

62+
private static final DeprecationHandler DEPRECATION_HANDLER = new DeprecationHandler() {
63+
64+
@Override
65+
public void usedDeprecatedName(String usedName, String modernName) {}
66+
67+
@Override
68+
public void usedDeprecatedField(String usedName, String replacedWith) {}
69+
};
70+
6271
private final Map<String, FilterRef> scope;
6372

6473
public RuleScope() {

0 commit comments

Comments
 (0)