Class LoggingDeprecationHandler

  • All Implemented Interfaces:
    DeprecationHandler

    public class LoggingDeprecationHandler
    extends Object
    implements 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.

    • Method Detail

      • usedDeprecatedName

        public void usedDeprecatedName​(String usedName,
                                       String modernName)
        Description copied from interface: DeprecationHandler
        Called when the provided field name matches a deprecated name for the field.
        Specified by:
        usedDeprecatedName in interface DeprecationHandler
        Parameters:
        usedName - the provided field name
        modernName - the modern name for the field
      • usedDeprecatedField

        public void usedDeprecatedField​(String usedName,
                                        String replacedWith)
        Description copied from interface: DeprecationHandler
        Called when the provided field name matches the current field but the entire field has been marked as deprecated.
        Specified by:
        usedDeprecatedField in interface DeprecationHandler
        Parameters:
        usedName - the provided field name
        replacedWith - the name of the field that replaced this field