Skip to content

Commit

Permalink
Annotate deprecation message to be improved for v9 (elastic#107639)
Browse files Browse the repository at this point in the history
  • Loading branch information
mosche authored Apr 22, 2024
1 parent c0417b3 commit f7349e2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.elasticsearch.core.Nullable;
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.core.Tuple;
import org.elasticsearch.core.UpdateForV9;
import org.elasticsearch.index.mapper.DateFieldMapper;
import org.elasticsearch.xcontent.ToXContentObject;
import org.elasticsearch.xcontent.XContentBuilder;
Expand Down Expand Up @@ -639,6 +640,7 @@ void checkDeprecation(Settings settings) {
if (this.isDeprecated() && this.exists(settings)) {
// It would be convenient to show its replacement key, but replacement is often not so simple
final String key = getKey();
@UpdateForV9 // https://github.com/elastic/elasticsearch/issues/79666
String message = "[{}] setting was deprecated in Elasticsearch and will be removed in a future release.";
if (this.isDeprecatedWarningOnly()) {
Settings.DeprecationLoggerHolder.deprecationLogger.warn(DeprecationCategory.SETTINGS, key, message, key);
Expand Down

0 comments on commit f7349e2

Please sign in to comment.