Package org.elasticsearch.common.joda
Class JodaDeprecationPatterns
org.elasticsearch.common.joda.JodaDeprecationPatterns
public class JodaDeprecationPatterns
extends
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic
pattern)
Formats deprecation message for suggestion field in a warning header.static boolean
pattern)
Checks if date parsing pattern is deprecated.Methods inherited from class java.lang.
, , , , , , , , , ,
-
Field Details
-
USE_NEW_FORMAT_SPECIFIERS
public static final USE_NEW_FORMAT_SPECIFIERS- See Also:
- Constant Field Values
-
-
Constructor Details
-
JodaDeprecationPatterns
public JodaDeprecationPatterns()
-
-
Method Details
-
isDeprecatedPattern
public static boolean isDeprecatedPattern( 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 fromFormatNames
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 formatSuggestion( 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
-