mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-30 10:23:41 -04:00
This change removes JodaCompatibleZonedDateTime and replaces it with ZonedDateTime for use in scripting. Breaking changes: * JodaCompatibleDateTime no longer exists and cannot be cast to in Painless. Use ZonedDateTime instead. * The dayOfWeek method on ZonedDateTime returns the DayOfWeek enum instead of an int from JodaCompatibleDateTime. dayOfWeekEnum still exists on ZonedDateTime as an augmentation to support the transition to ZonedDateTime, but is now deprecated in favor of dayOfWeek on ZonedDateTime.
25 lines
No EOL
922 B
Text
25 lines
No EOL
922 B
Text
[discrete]
|
|
[[breaking_80_scripting_changes]]
|
|
==== Scripting changes
|
|
|
|
//NOTE: The notable-breaking-changes tagged regions are re-used in the
|
|
//Installation and Upgrade Guide
|
|
|
|
//tag::notable-breaking-changes[]
|
|
.The `JodaCompatibleDateTime` class has been removed.
|
|
[%collapsible]
|
|
====
|
|
*Details* +
|
|
As a transition from Joda datetime to Java datetime, scripting used
|
|
an intermediate class called `JodaCompatibleDateTime`. This class has
|
|
been removed and is replaced by `ZonedDateTime`. Any use of casting
|
|
to a `JodaCompatibleDateTime` in a script will result in a compilation
|
|
error, and may not allow the upgraded node to start.
|
|
|
|
*Impact* +
|
|
Before upgrading, replace `getDayOfWeek` with `getDayOfWeekEnum().value` in any
|
|
scripts. Any use of `getDayOfWeek` expecting a return value of `int` will result
|
|
in a compilation error or runtime error and may not allow the upgraded node to
|
|
start.
|
|
====
|
|
// end::notable-breaking-changes[] |