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