Class JodaDeprecationPatterns

java.lang.Object
org.elasticsearch.common.joda.JodaDeprecationPatterns

public class JodaDeprecationPatterns extends Object
  • Field Details

  • Constructor Details

    • JodaDeprecationPatterns

      public JodaDeprecationPatterns()
  • Method Details

    • isDeprecatedPattern

      public static boolean isDeprecatedPattern(String pattern)
      Checks if date parsing pattern is deprecated. Deprecated here means: when it was not already prefixed with 8 (meaning already upgraded) and it is not a predefined pattern from FormatNames like basic_date_time_no_millis and it uses pattern characters which changed meaning from joda to java like Y becomes y.
      Parameters:
      pattern - - a format to be checked
      Returns:
      true if format is deprecated, otherwise false
    • formatSuggestion

      public static String formatSuggestion(String pattern)
      Formats deprecation message for suggestion field in a warning header. Joins all warnings in a one message.
      Parameters:
      pattern - - a pattern to be formatted
      Returns:
      a formatted deprecation message