Browse Source

Update joda dependency to latest 2.10.10 (#72052)

Latest JDKs are shipping with timezone data 2021a which is also included
in latest joda. In order to have the timezone information consistent in
both joda and java.time joda dependnecy has to be updated

closes #72028
Przemyslaw Gomulka 4 years ago
parent
commit
b0a0d56bbe

+ 1 - 1
buildSrc/version.properties

@@ -22,7 +22,7 @@ ecsLogging        = 0.1.3
 jna               = 5.7.0-1
 
 netty             = 4.1.49.Final
-joda              = 2.10.4
+joda              = 2.10.10
 
 commons_lang3                   = 3.9
 

+ 1 - 1
gradle.properties

@@ -15,4 +15,4 @@ systemProp.jdk.tls.client.protocols=TLSv1.2
 
 # java homes resolved by environment variables
 org.gradle.java.installations.auto-detect=false
-org.gradle.java.installations.fromEnv=JAVA_HOME,RUNTIME_JAVA_HOME,JAVA16_HOME,JAVA15_HOME,JAVA14_HOME,JAVA13_HOME,JAVA12_HOME,JAVA11_HOME,JAVA8_HOME
+org.gradle.java.installations.fromEnv=JAVA_HOME,RUNTIME_JAVA_HOME,JAVA17_HOME,JAVA16_HOME,JAVA15_HOME,JAVA14_HOME,JAVA13_HOME,JAVA12_HOME,JAVA11_HOME,JAVA8_HOME

+ 1 - 0
server/licenses/joda-time-2.10.10.jar.sha1

@@ -0,0 +1 @@
+29e8126e31f41e5c12b9fe3a7eb02e704c47d70b

+ 0 - 1
server/licenses/joda-time-2.10.4.jar.sha1

@@ -1 +0,0 @@
-8c10bb8815109067ce3c91a8e547b5a52e8a1c1a

+ 7 - 2
server/src/test/java/org/elasticsearch/common/time/DateUtilsTests.java

@@ -34,12 +34,17 @@ import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.is;
 
 public class DateUtilsTests extends ESTestCase {
+    // list of ignored timezones.
+    // These should be cleaned up when all tested jdks (oracle, adoptopenjdk, openjdk etc) have the timezone db included
+    // see when a timezone was included in jdk version here https://www.oracle.com/java/technologies/tzdata-versions.html
     private static final Set<String> IGNORE = new HashSet<>(Arrays.asList(
         "Eire", "Europe/Dublin", // dublin timezone in joda does not account for DST
-        "Asia/Qostanay" // this has been added in joda 2.10.2 but is not part of the JDK 12.0.1 tzdata yet
+        "Asia/Qostanay", // part of tzdata2018h
+        "America/Godthab", // part of tzdata2020a (maps to America/Nuuk)
+        "America/Nuuk"// part of tzdata2020a
     ));
 
-    @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/72039")
+
     public void testTimezoneIds() {
         assertNull(DateUtils.dateTimeZoneToZoneId(null));
         assertNull(DateUtils.zoneIdToDateTimeZone(null));

+ 1 - 0
x-pack/plugin/sql/sql-action/licenses/joda-time-2.10.10.jar.sha1

@@ -0,0 +1 @@
+29e8126e31f41e5c12b9fe3a7eb02e704c47d70b

+ 0 - 1
x-pack/plugin/sql/sql-action/licenses/joda-time-2.10.4.jar.sha1

@@ -1 +0,0 @@
-8c10bb8815109067ce3c91a8e547b5a52e8a1c1a