Class LoggingDeprecationHandler

java.lang.Object
org.elasticsearch.common.xcontent.LoggingDeprecationHandler
All Implemented Interfaces:
org.elasticsearch.xcontent.DeprecationHandler

public class LoggingDeprecationHandler extends Object implements org.elasticsearch.xcontent.DeprecationHandler
Logs deprecations to the DeprecationLogger.

This is core's primary implementation of DeprecationHandler and should absolutely be used everywhere where it parses requests. It is much less appropriate when parsing responses from external sources because it will report deprecated fields back to the user as though the user sent them.

  • Field Details

  • Method Details

    • usedDeprecatedName

      public void usedDeprecatedName(String parserName, Supplier<org.elasticsearch.xcontent.XContentLocation> location, String usedName, String modernName)
      Specified by:
      usedDeprecatedName in interface org.elasticsearch.xcontent.DeprecationHandler
    • usedDeprecatedField

      public void usedDeprecatedField(String parserName, Supplier<org.elasticsearch.xcontent.XContentLocation> location, String usedName, String replacedWith)
      Specified by:
      usedDeprecatedField in interface org.elasticsearch.xcontent.DeprecationHandler
    • usedDeprecatedField

      public void usedDeprecatedField(String parserName, Supplier<org.elasticsearch.xcontent.XContentLocation> location, String usedName)
      Specified by:
      usedDeprecatedField in interface org.elasticsearch.xcontent.DeprecationHandler